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

Closed
opened 2025-12-29 19:36:37 +01:00 by adam · 0 comments
Owner

Originally created by @moonrail on GitHub (Feb 15, 2022).

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

Originally created by @moonrail on GitHub (Feb 15, 2022). ### 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
adam added the type: featurestatus: needs owner labels 2025-12-29 19:36:37 +01:00
adam closed this issue 2025-12-29 19:36:37 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6089