-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search for multiple tags in url #2558
Comments
I'm marking this as a bug (as opposed to a feature request) as I think it's reasonable to expect that tags should work this way already. As for the implementation, there's some discussion around different approaches here, but we'll probably just make a custom |
If one would like it to be OR instead of AND. How would that me modelled? I am also seeing a case where you would want to list the items that match tag "vpn1" OR "vpn2" in a single call. I prefer the AND notation though. Not sure what is customary in REST. |
The behavior exhibited by existing filters is OR. For example, I don't think there's any inherent mechanism for implying OR vs AND in django-filter. |
I understand. What I would prefer for the "?tag=" filter is AND. What about using the ?tag=vpn1,vpn2 construct to indicate AND? |
I've implemented this with the AND logic, such that |
Is this functionality working properly? I have tested it in my environment and it doesn't seem to be returning the correct data. |
Works for me as specified. Are you running a proper version?
…On Thu, Apr 11, 2019 at 5:35 PM alimoghrabi ***@***.***> wrote:
Is this functionality working properly? I have tested it in my environment
and it doesn't seem to be returning the correct data.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#2558 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AND2a1uEfQTVJt7dwvC980bX6iZn0UPNks5vf1ZZgaJpZM4YSIqz>
.
|
Environment
Proposed Functionality
It would be nice to be able to search for multiple tags (or other keywords) like so:
https://netbox/api/ipam/prefixes/?tag=vpn1&tag=vpn2
This should yield a list of items that matches both tags. Currently the above URL only returns the items that match tag"vpn2".
Use Case
If one has multiple customers and wants a list of resources that affects a few specific customers this could come in handy. Also, if you want to highlight prefixes that are link nets between sites, tags are appropriate to find the link nets that span over two (or more) specific sites.
Database Changes
External Dependencies
The text was updated successfully, but these errors were encountered: