Skip to content

Searchable Contact Assignments per Content-Type in API/UI #8645

@moonrail

Description

@moonrail

NetBox version

v3.1.7

Feature type

New functionality

Proposed functionality

I propose adding query/filter parameters in the API & UI on each Content-Type, that is supported by Contact Assignments.

So it would be possible to just filter by Contact & Contact-Role to receive all matching Objects:
virtualization/virtual-machines/?contact=Some%20Team&contact_role=administration

If the direct integration is not the design pattern desired by the maintainers, and it should be kept as a standalone endpoint/functionality, the UI at least requires a combined filterable list on all Contact Assignments, that basically represents the API endpoint /api/tenancy/contact-assignments/ for users being able to leverage this useful feature.
Like with /dcim/interfaces/ in the UI.

Use case

Currently the only places for viewing Contact Assignments in the UI are:

  • on the Contact itself
  • on the Contact-Role itself
  • on the Object itself

All these pages provide no further filtering on shown Contact Assignments.

Consider having a Contact that has more than a handful of Devices, VMs, Virtual-Chassis and Clusters assigned - how would one leverage the UI to find all VMs, the Contact is an "Administrator" for?

Via API it is possible to filter for NetBox Objects by Contact & Contact-Role, e.g.:
api/tenancy/contact-assignments/?content_type=virtualization.virtualmachine&contact_id=6&role=administration

Database changes

None

External dependencies

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs ownerThis issue is tentatively accepted pending a volunteer committed to its implementationtype: featureIntroduction of new functionality to the application

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions