Skip to content

GraphQL filter location list by contacts #20253

@llamafilm

Description

@llamafilm

NetBox version

v4.3.2

Feature type

New functionality

Proposed functionality

Using GraphQL, I would like to be able to filter the location_list by assigned contacts. For example:

{
  location_list(
    filters:{
      site: {name: {exact:"LA-LAI"}}
      contacts: {name: {exact:"MSE"}}
    }) {
    id
  }
}

This query fails with error

Unsupported lookup 'name__exact' for GenericRel or join on the field not permitted.

Use case

We use contacts to define which team is responsible for supporting each location. I want to build a Grafana dashboard to visualize how many rooms are supported by each team.

Database changes

No response

External dependencies

No response

Metadata

Metadata

Assignees

Labels

severity: lowDoes not significantly disrupt application functionality, or a workaround is availablestatus: acceptedThis issue has been accepted for implementationtype: bugA confirmed report of unexpected behavior in the application

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions