Add a tag_id filter for all models which support tagging #10833

Closed
opened 2025-12-29 21:36:26 +01:00 by adam · 1 comment
Owner

Originally created by @jeremystretch on GitHub (Feb 28, 2025).

Originally assigned to: @renatoalmeidaoliveira on GitHub.

NetBox version

v4.2.4

Feature type

Data model extension

Proposed functionality

Add a tag_id filter to NetBoxModelFilterSet, which will enable filtering of objects by tag ID. This should function similarly to the existing tag filter (which matches by tag slug). For example:

GET /api/dcim/sites/?tag_id=100&tag_id=200

Use case

This provides an alternative to referencing tags by their slugs, and may be needed in some specific scenarios (such as that described in #18757).

Database changes

N/A

External dependencies

N/A

Originally created by @jeremystretch on GitHub (Feb 28, 2025). Originally assigned to: @renatoalmeidaoliveira on GitHub. ### NetBox version v4.2.4 ### Feature type Data model extension ### Proposed functionality Add a `tag_id` filter to NetBoxModelFilterSet, which will enable filtering of objects by tag ID. This should function similarly to the existing `tag` filter (which matches by tag slug). For example: `GET /api/dcim/sites/?tag_id=100&tag_id=200` ### Use case This provides an alternative to referencing tags by their slugs, and may be needed in some specific scenarios (such as that described in #18757). ### Database changes N/A ### External dependencies N/A
adam added the status: acceptedtype: featurecomplexity: low labels 2025-12-29 21:36:26 +01:00
adam closed this issue 2025-12-29 21:36:26 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 10, 2025):

PR #18889 was mistakenly merged into main.

@jeremystretch commented on GitHub (Apr 10, 2025): PR #18889 was mistakenly merged into `main`.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#10833