You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, when you hit the API at /api/dcim/interfaces/[id]/ you get a lot of attributes such device, is_connected, description, and more importantly, interface_connection. All of this is very helpful, but what is missing that I'd like to have added is the id of the interface_connection (if applicable).
For example, the output you get from /api/dcim/interfaces/59/ is as follows (some fields have been removed for brevity):
I know I can get the information I'm looking for (i.e. the id for the interface_connection) by hitting the API at /api/dcim/interface_connections/?device=foo-bar-a and doing some basic logic to determine if the device in question is on the "a-side" or the "b-side" of the interface_connection.
For example, you get the following output (some fields have also been remove for brevity):
I don't imagine that this would take too much effort to implement (perhaps one to two lines of code), but if that is not the base, please let me know and I'll go back the "hack" that I was using previously.
The text was updated successfully, but these errors were encountered:
One thing that I forgot to mention is why does /api/dcim/interfaces/ allow for the filters ?device=[NAME]AND?device_id=[ID] but /api/dcim/interface-connections/ only allows for ?device=[NAME]?
Not a huge issue, but I'd imagine that consistency between the two would be fairly important.
Issue type
[X] Feature request
Environment
Description
Currently, when you hit the API at
/api/dcim/interfaces/[id]/
you get a lot of attributes suchdevice
,is_connected
,description
, and more importantly,interface_connection
. All of this is very helpful, but what is missing that I'd like to have added is theid
of theinterface_connection
(if applicable).For example, the output you get from
/api/dcim/interfaces/59/
is as follows (some fields have been removed for brevity):I know I can get the information I'm looking for (i.e. the
id
for theinterface_connection
) by hitting the API at/api/dcim/interface_connections/?device=foo-bar-a
and doing some basic logic to determine if thedevice
in question is on the "a-side" or the "b-side" of theinterface_connection
.For example, you get the following output (some fields have also been remove for brevity):
In summary, the desired output I'd like to get of
/api/dcim/interfaces/59/
is the following (note the addedid
ofinterface_connection
):I don't imagine that this would take too much effort to implement (perhaps one to two lines of code), but if that is not the base, please let me know and I'll go back the "hack" that I was using previously.
The text was updated successfully, but these errors were encountered: