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
Fields
| 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 | str | None | HTTP response body (may be truncated) | |
| error | str | None | Error message if delivery failed | |
| timestamp | datetime | When the delivery was attempted | - |
Permissions
| Role | Create | Delete | Read | Write |
|---|---|---|---|---|
| Admin | ✓ | ✓ | ✓ | ✓ |
| Manager | ✓ |
Configuration
| Setting | Value |
|---|---|
| Submittable | False |
| Track Changes | True |
Controller
Controller hooks are implemented in *_controller.py files.
Available lifecycle hooks:
validate()- Called before save, raise exceptions for validation errorsbefore_insert()- Called before inserting a new documentafter_insert()- Called after successfully insertingbefore_save()- Called before saving (insert or update)after_save()- Called after savingbefore_delete()- Called before deletingafter_delete()- Called after deleting