Skip to content

WebhookLog

Webhook delivery audit log.

Records each webhook delivery attempt with status, response,
and error information for debugging and auditing.
Attributes:
webhook: Reference to the Webhook DocType name
event: The event that triggered the webhook
status: Delivery status ('success' or 'failed')
response_code: HTTP response status code
response_body: HTTP response body (truncated)
error: Error message if delivery failed
timestamp: When the delivery was attempted

Source: webhook_log.py

Field Type Required Description Validators
webhook str Reference to Webhook name minLen: 1
event str Event that triggered the webhook (e.g., ‘doc.created’) minLen: 1
status str Delivery status: ‘success’ or ’failed -
response_code int HTTP response status code -
response_body None HTTP response body (may be truncated) -
error None Error message if delivery failed -
timestamp datetime When the delivery was attempted -
Role Create Delete Read Write
Admin
Manager
Setting Value
Submittable False
Track Changes True

Controller hooks are implemented in *_controller.py files. Available lifecycle hooks:

  • validate() - Called before save, raise exceptions for validation errors
  • before_insert() - Called before inserting a new document
  • after_insert() - Called after successfully inserting
  • before_save() - Called before saving (insert or update)
  • after_save() - Called after saving
  • before_delete() - Called before deleting
  • after_delete() - Called after deleting