Skip to content

Filter on CNAME #648

Closed Answered by peteeckel
jnc27 asked this question in Q&A
May 30, 2025 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hi @jnc27, thanks for asking.

First of all, this is not specific to CNAME records, not even to records or any other model within and without of a plugin.

API filters work differently from Django model filters, meaning that the usual expressions like __contains, __startswith etc. don't work in the API.

There is, however, a basic set of filter modifiers that do work (see the Swagger API documentation link on the bottom of the NetBox window):

Modifier Meaning
__empty is null
__ic contains (case insensitive)
__ie is equal (case insensitive)
__iew ends with (case insensitive)
__isw starts with (case insensitive)
__n is not equal
__nic does not contain (case insensitive)
__nie

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jnc27
Comment options

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