Skip to content

Allow filtering IP addresses by Family in GraphQL API #19605

@mraerino

Description

@mraerino

NetBox version

v4.3.1

Feature type

Change to existing functionality

Proposed functionality

I would like to be able to filter list of IP addresses in the graphQL API by their IP version (4 or 6).

This would make queries like these work:

{
  ip_address_list(filters: {family: FAMILY_6}) {
    address
  }
}
{
  device_list {
    interfaces {
      ip_addresses(filters: {family: FAMILY_6}) {
        address
      }
    }
  }
}

Use case

We're using graphql to gather input to our configuration management. Sometimes we need just IP addresses of a certain family (e.g. when a tool is single-stacked).

This used to be possible in versions prior to 4.3.x

The REST API allows filtering IP addresses using the family query param.

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

Labels

complexity: lowRequires minimal effort to implementstatus: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions