Add latest changelog ID on webhook #5453

Closed
opened 2025-12-29 19:28:14 +01:00 by adam · 2 comments
Owner

Originally created by @ifoughal on GitHub (Oct 1, 2021).

NetBox version

v3.0.4

Feature type

Data model extension

Proposed functionality

Add latest changelog to object's data, or related changelog ID to payload from webhook, so that the changelog can be easily parsed during webhook processing from other services like for example Jenkins.

I have initially tried to match the changelog to the payload with the time stamp, except that they don't match...

Eg: The timestamp on the payload / object was the following:

"last_updated": "2021-09-28T09:28:41.374407Z"

but on the changelog, it differed to the following:

"time": "2021-09-28T09:28:41.401949Z",

Use case

Our use case is sending emails to specific team when some specific objects are modifying/created or deleted.

The jenkins pipeline receiving the webhook doesn't contain any information regarding the changelog, thus the teams notified of said changes don't have any information on what has been changed, unless we give them explicit access to said objects on Netbox (which we do not want to, hence the automated emails).

Having the changelog ID (latest changelog update on the object upon update/create/delete trigger, or relative changelog to triggerd payload from webhook). Having this changelog ID would help any getting the specifc pre/post changes and making a diff to include the information in said email.

Database changes

Extra field for all netbox objects which contain the changelog on the GUI.

External dependencies

None.

Originally created by @ifoughal on GitHub (Oct 1, 2021). ### NetBox version v3.0.4 ### Feature type Data model extension ### Proposed functionality Add latest changelog to object's data, or related changelog ID to payload from webhook, so that the changelog can be easily parsed during webhook processing from other services like for example Jenkins. I have initially tried to match the changelog to the payload with the time stamp, except that they don't match... Eg: The timestamp on the payload / object was the following: > "last_updated": "2021-09-28T09:28:41.374407Z" but on the changelog, it differed to the following: > "time": "2021-09-28T09:28:41.401949Z", ### Use case Our use case is sending emails to specific team when some specific objects are modifying/created or deleted. The jenkins pipeline receiving the webhook doesn't contain any information regarding the changelog, thus the teams notified of said changes don't have any information on what has been changed, unless we give them explicit access to said objects on Netbox (which we do not want to, hence the automated emails). Having the changelog ID (latest changelog update on the object upon update/create/delete trigger, or relative changelog to triggerd payload from webhook). Having this changelog ID would help any getting the specifc pre/post changes and making a diff to include the information in said email. ### Database changes Extra field for all netbox objects which contain the changelog on the GUI. ### External dependencies None.
adam added the type: feature label 2025-12-29 19:28:14 +01:00
adam closed this issue 2025-12-29 19:28:15 +01:00
Author
Owner

@jeremystretch commented on GitHub (Oct 5, 2021):

The pre- and post-change data is included in the webhook body by default. Why do you want to retrieve it separately?

@jeremystretch commented on GitHub (Oct 5, 2021): The pre- and post-change data is included in the webhook body by default. Why do you want to retrieve it separately?
Author
Owner

@jeremystretch commented on GitHub (Nov 12, 2021):

Closing this out as there's been no further discussion.

@jeremystretch commented on GitHub (Nov 12, 2021): Closing this out as there's been no further discussion.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#5453