Closes #20003: Introduce mechanism to register callbacks for webhook context #1515

Closed
opened 2026-04-06 02:53:58 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @jeremystretch on 8/5/2025

Closes: #20003

  • Simplify the signature of enqueue_event() to pass the request object directly (instead of the user & request ID)
  • Attach the request object to the event when it is enqueued for processing
  • Alter the signature of process_event_rules() to take a request object rather than a request ID
  • Alter the parameters recorded for send_webhook tasks
    • Replace model_name with object_type
    • Add request if present
  • Introduce the process_event_rules() function for use by plugins
    • Add webhook_callbacks to the NetBox registry
  • Extend send_webhook() to gather additional context data from registered webhook callbacks
  • Update event tests
*Originally created by @jeremystretch on 8/5/2025* ### Closes: #20003 - Simplify the signature of `enqueue_event()` to pass the request object directly (instead of the user & request ID) - Attach the request object to the event when it is enqueued for processing - Alter the signature of `process_event_rules()` to take a request object rather than a request ID - Alter the parameters recorded for `send_webhook` tasks - Replace `model_name` with `object_type` - Add `request` if present - Introduce the `process_event_rules()` function for use by plugins - Add `webhook_callbacks` to the NetBox registry - Extend `send_webhook()` to gather additional context data from registered webhook callbacks - Update event tests
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1515