Skip to content
Discussion options

You must be logged in to vote

does not give any results (would expect multiple sites some with mytag1 and others with mytag2

I would expect it to return only those sites which have both mytag1 and mytag2. This is how queries via the REST API work at least, as documented here:

https://docs.netbox.dev/en/stable/reference/filtering/#filtering-objects

a logical AND operation will be used in instances where a field may have multiple values, such as tags. For example, GET /api/dcim/sites/?tag=foo&tag=bar will return only sites which have both the "foo" and "bar" tags applied.

(and I believe the filtering logic is common between REST and graphql).

See also discussion #11703

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@candlerb
Comment options

@arjenvri
Comment options

@candlerb
Comment options

Answer selected by arjenvri
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