-
Hi All. The question I would like to pose is how can I get a list ( as an api ) of links between devices. The netbox-ui-plugin does a good job in creating a topology diagram of how devices are linked by just pass a list of deivces but I need the links information to be passed through as api so we can know how the devices are linked. Thanking you |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
You need to search for "Cables". Assuming it's the REST API you're talking about, then the endpoint is Note that the cable model changed substantially between Netbox 3.2 and 3.3, so if you're not yet on 3.3, it would be better to upgrade to this first before spending too much time on it. Note also that the Cables model only gives individual cable segments, so if device A is connected to device B via patch panels P and Q, you'll find three separate cables A-P, P-Q, Q-B. You may find it useful to try the |
Beta Was this translation helpful? Give feedback.
-
I managed to resolve the issue by creating another django app and creating a class that extends ApiVIew for the view. I imported the get_topology from nextbox_ui_plugin.views and passed the device_ids using the queryset, filterset and it returns devices information with the topology links. |
Beta Was this translation helpful? Give feedback.
I managed to resolve the issue by creating another django app and creating a class that extends ApiVIew for the view. I imported the get_topology from nextbox_ui_plugin.views and passed the device_ids using the queryset, filterset and it returns devices information with the topology links.