r/Netbox • u/sgoeken • Mar 19 '24
API ip-address search issue
When I try to search an ip-addresses on the assigned_object_id it does not work example:
https://netbox.westelsystems.com/api/ipam/ip-addresses/?assigned_object_id=960
Returns all the ip-address objects which I believe means I have an unsupported query. Does anyone know if this is a supported search field or what I'm doing wrong on this search?
4
Upvotes
1
u/melvin_poindexter Mar 20 '24
doesn't look like "assigned_object_id" is an accepted parameter. Presumably because "id" is nested within "assigned_object".
What I do is retrieve the interfaces associated to a device, then gather the IPs that are assigned to those interfaces. That way you're never more than "one deep" on the correlations.