How to filter with related models? #615
-
Hi! I'm trying to list all circuits which are linked (on Termination A) to a site. Within the Netbox Django ORM, if I do
I get the expected results. But when I do with pynetbox
I get a list of aaaaall circuits in Netbox! What am I missing? Thanks for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
NetBox REST API ignores unknown request parameters, like See the REST API documentation of your NetBox installation for the list of available filtering parameters in |
Beta Was this translation helpful? Give feedback.
NetBox REST API ignores unknown request parameters, like
termination_a__site__name
, thus your call requests all circuits.See the REST API documentation of your NetBox installation for the list of available filtering parameters in
GET /api/circuits/circuits/
call (for example: https://demo.netbox.dev/api/schema/swagger-ui/#/circuits/circuits_circuits_list). Maybe there isn't a direct corresponding option in the REST API filtering parameters, so you may need to use some additional client-side logic to implement the same functionality.