Replies: 2 comments 1 reply
-
https://docs.netbox.dev/en/stable/reference/filtering/#filtering-objects
That's the current, official documented behaviour. |
Beta Was this translation helpful? Give feedback.
-
So the work done in the case was scrapped? Unfinished? It sure seems like the intent of the cases was to make both AND and OR queries possible, even for Tag fields. Someone even noted in the case that the documentation wasn't indicating the enhanced behavior. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using NetBox v3.4.6. According to this (from 2019):
#3038
... it sounds the I should be able to query:
/api/ipam/ip-addresses/?tag=foo&tag-bar
... and I should get results for tag=foo OR tag=bar? However, it seems to behave the old way (tag=foo AND tag=bar).
Same AND behavior happens in the UI at /ipem/ip-addresses/?tag=foo&tag=bar.
When I try the new AND method with /api/ipam/ip-addresses/?tag=foo,bar ... I get:
HTTP 400 Bad Request
Allow: GET, POST, PUT, PATCH, DELETE, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
{
"tag": [
"Select a valid choice. foo,bar is not one of the available choices."
]
}
... which is also the old behavior (no support for comma-separated values). In the UI, it just returns everything as if I didn't specify a filter.
What am I missing?
Thanks,
-- Ed
Beta Was this translation helpful? Give feedback.
All reactions