Webhook payload
The JSON body DataGerry POSTs to a webhook URL. How webhooks are set up and when they fire is described in Webhooks.
Request
Method
POST, headerContent-Type: application/json, UTF-8.Timeout 3 seconds; redirects are not followed.
Any
2xxresponse counts as delivered.
Body
Key |
Content |
|---|---|
|
When the event was created (UTC), as |
|
|
|
The object before the change. |
|
The object after the change. |
|
On |
Object
object_before and object_after contain the stored object:
Key |
Content |
|---|---|
|
The object’s ID. |
|
The ID of its type. |
|
Active flag. |
|
List of |
|
Entries of multi data sections. |
|
IDs of the creating and last editing user. |
|
Timestamps, as |
|
Object version. |
Further keys of the object (for example special_type) may be present.
Examples
Create (abbreviated):
{
"event_time": {"$date": 1760438400000},
"operation": "CREATE",
"object_before": null,
"object_after": {
"public_id": 42,
"type_id": 3,
"active": true,
"fields": [
{"name": "hostname", "value": "web-01", "type": "text"},
{"name": "ip", "value": "10.0.0.11", "type": "text"}
],
"multi_data_sections": [],
"author_id": 1,
"version": "1.0.0"
},
"changes": null
}
Update of one field (abbreviated):
{
"event_time": {"$date": 1760438460000},
"operation": "UPDATE",
"object_before": {"public_id": 42, "fields": [{"name": "ip", "value": "10.0.0.11", "type": "text"}]},
"object_after": {"public_id": 42, "fields": [{"name": "ip", "value": "10.0.0.12", "type": "text"}]},
"changes": {
"old": [{"name": "ip", "value": "10.0.0.11", "type": "text"}],
"new": [{"name": "ip", "value": "10.0.0.12", "type": "text"}]
}
}
Delete: operation is DELETE, object_before holds the object as it was before
deletion, object_after and changes are null.
Webhook log
Each delivery attempt is stored as a log entry: the payload above plus webhook_id,
response_code (0 when no response arrived) and status (true when
delivered). These fields are not part of the request body.