Skip to content
Discussion options

You must be logged in to vote

/api/dcim/devices/?location_id=5 works as expected.

The available filters are included in the machine-generated REST API documentation, linked from the bottom of your Netbox home page or at https://demo.netbox.dev/api/schema/swagger-ui/

Under GET /api/dcim/devices/:

This shows that filtering on location_id is the only one available (__n is the negative variation)

You'll need to do a separate REST query to find the id of the location you're interested in. Or possibly graphQL can do it directly, I don't know.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by llamafilm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants