Replies: 1 comment
-
If you use the pynetbox python library you can do precisely that. It will handle the additional needed API get request without you having to think about it. Example: you have an interface and woul like to know the device tenant for the iterface, you simply do: x = interface.device.tenant.name In th backend, this is multiple requests |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the VMware python API, it supports automatically fetching related objects. Does something like this exist for Netbox?
For example, I can query for hosts.all() and it will return a list of all hosts via a single HTTP request, but then if I iterate through each host and fetch all child VMs, another HTTP request will go out. I do not have to compose a separate standalone fetch to get the VM list.
Beta Was this translation helpful? Give feedback.
All reactions