Here is the data I send to my netbox:
"
{'termination_a_id': '11120',
'termination_a_type': 'dcim.interface',
'termination_b_id': '11121',
'termination_b_type': 'dcim.interface',
'terminaton_a': {'device': {'id': 398, 'name': 'v3aw33-lsw01'},
'id': '11120',
'name': 'ETH1/31'},
'terminaton_b': {'device': {'id': 399, 'name': 'v3aw33-lsw02'},
'id': '11121',
'name': 'ETH1/31'}}
"
All the information is correct but I note that the information sent to my netbox are different and false ...
"MGMT <> ETH1/1" and an reversal between termination_a and b
Is it a bug or did anyone manage to make it work?
Thx
Hello
Sorry for the bad explanation.
Here is a the data contained into my dictionnary.
{'termination_a_id': '11120',
'termination_a_type': 'dcim.interface',
'termination_b_id': '11121',
'termination_b_type': 'dcim.interface',
'terminaton_a': {'device': {'id': 398, 'name': 'v3aw33-lsw01'},
'id': '11120',
'name': 'ETH1/31'},
'terminaton_b': {'device': {'id': 399, 'name': 'v3aw33-lsw02'},
'id': '11121',
'name': 'ETH1/31'}}
--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/cf65066c-1b59-4ddf-bed5-5931f0ff93f1%40googlegroups.com.
Previously, specifying a related object in an API request required knowing the primary key (integer ID) of that object.
For example, when creating a new device, its rack would be specified as an integer:
{
"name": "MyNewDevice",
"rack": 123,
...
}
The NetBox API now also supports referencing related objects by a set of sufficiently unique attrbiutes. For example, a
rack can be identified by its name and parent site:
{
"name": "MyNewDevice",
"rack": {
"site": {
"name": "Equinix DC6"
},
"name": "R204"
},
...
}--
You received this message because you are subscribed to the Google Groups "NetBox" group.
To unsubscribe from this group and stop receiving emails from it, send an email to netbox-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/netbox-discuss/7915efaa-68fa-4b41-bbfc-6336212f5c27%40googlegroups.com.
Thank you for these explanations. I understand better now.
I'm now trying to get the interface ID but I can not do it.
I use this:
test = nb.dcim.interfaces.get (
device = Sedev,
name = srint,
)
Here is the result that sends my request:
{'device': {'id': 398, 'name': 'v3aw33-lsw01'}, 'name': 'ETH1 / 31'}
But I get a
"none"
However, the device and the interface exist.

Do you know how to retrieve it?
test = nb.dcim.interfaces.get (
device_id = Sedev.id,
name = srint,
)