Add “date_added” field to tags on objects #11664

Closed
opened 2025-12-29 21:48:15 +01:00 by adam · 2 comments
Owner

Originally created by @rizlas on GitHub (Sep 29, 2025).

NetBox version

v4.4.1

Feature type

Data model extension

Proposed functionality

Add a date_added field to the tag relationship of all objects in NetBox. Currently, tags are attached to objects (devices, circuits, IPs, etc.) without any record of when the tag was added. With this enhancement, the API response for an object’s tags would include the date the tag was assigned, for example:

"tags": [
    {
        "id": 415,
        "url": "https://netbox/api/extras/tags/415/",
        "display_url": "https://netbox/extras/tags/415/",
        "display": "Inventory",
        "name": "Inventory",
        "slug": "inventory",
        "color": "9e9e9e",
        "date_added": "2025-09-29T10:15:00Z"
    }
]

This allows for more informed automation and reporting based on the age of tags.

Use case

  • Automations that need to act on objects only after a tag has been present for a certain time. (e.g. deletion)
  • Enabling workflows that depend on the lifecycle of tags rather than just their presence.

Database changes

date_added field to Tag model

External dependencies

No response

Originally created by @rizlas on GitHub (Sep 29, 2025). ### NetBox version v4.4.1 ### Feature type Data model extension ### Proposed functionality Add a date_added field to the tag relationship of all objects in NetBox. Currently, tags are attached to objects (devices, circuits, IPs, etc.) without any record of when the tag was added. With this enhancement, the API response for an object’s tags would include the date the tag was assigned, for example: ```json "tags": [ { "id": 415, "url": "https://netbox/api/extras/tags/415/", "display_url": "https://netbox/extras/tags/415/", "display": "Inventory", "name": "Inventory", "slug": "inventory", "color": "9e9e9e", "date_added": "2025-09-29T10:15:00Z" } ] ``` This allows for more informed automation and reporting based on the age of tags. ### Use case - Automations that need to act on objects only after a tag has been present for a certain time. (e.g. deletion) - Enabling workflows that depend on the lifecycle of tags rather than just their presence. ### Database changes `date_added` field to Tag model ### External dependencies _No response_
adam added the type: feature label 2025-12-29 21:48:15 +01:00
adam closed this issue 2025-12-29 21:48:16 +01:00
Author
Owner

@jnovinger commented on GitHub (Oct 2, 2025):

The information you need is already available through change logging, it just requires querying the changelog. Adding timestamp tracking to tags pushes too much application logic into NetBox when this kind of time-based automation is better handled outside the system.

@jnovinger commented on GitHub (Oct 2, 2025): The information you need is already available through change logging, it just requires querying the changelog. Adding timestamp tracking to tags pushes too much application logic into NetBox when this kind of time-based automation is better handled outside the system.
Author
Owner

@jeremystretch commented on GitHub (Oct 2, 2025):

Adding timestamp tracking to tags pushes too much application logic into NetBox when this kind of time-based automation is better handled outside the system.

To add, it's not a pattern we want to introduce, as it's unique to many-to-many assignments. (For instance, how would you track the time a comparable ForeignKey field is changed, given that there is no intermediate model?) You might also consider employing event rules & webhooks to trigger events as needed.

@jeremystretch commented on GitHub (Oct 2, 2025): > Adding timestamp tracking to tags pushes too much application logic into NetBox when this kind of time-based automation is better handled outside the system. To add, it's not a pattern we want to introduce, as it's unique to many-to-many assignments. (For instance, how would you track the time a comparable ForeignKey field is changed, given that there is no intermediate model?) You might also consider employing event rules & webhooks to trigger events as needed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11664