Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Webhook call

Retrieve a webhook call

Returns

Returns a resource object of type webhook_call.

Examples

GET https://site-api.datocms.com/webhook_calls/:webhook_call_id HTTP/1.1
Authorization: Bearer YOUR-API-TOKEN
Accept: application/json
X-Api-Version: 3
Terminal window
curl -g 'https://site-api.datocms.com/webhook_calls/:webhook_call_id' \
\
-H "Authorization: Bearer YOUR-API-TOKEN" \
-H "Accept: application/json" \
-H "X-Api-Version: 3"
await fetch("https://site-api.datocms.com/webhook_calls/:webhook_call_id", {
headers: {
Authorization: "Bearer YOUR-API-TOKEN",
Accept: "application/json",
"X-Api-Version": "3",
},
});
HTTP/1.1 200 OK
Content-Type: application/json
Cache-Control: cache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
{
"data": {
"type": "webhook_call",
"id": "42",
"attributes": {
"entity_type": "item",
"event_type": "update",
"created_at": "2016-09-20T18:50:24.914Z",
"request_url": "https://www.example.com/webhook",
"request_headers": {
"Accept": "*/*",
"User-Agent": "DatoCMS (datocms.com)",
"Authorization": "Basic Y2lhbzptaWFv",
"Content-Type": "application/json"
},
"request_payload": "{\"webhook_call_id\":\"103216210\",\"event_triggered_at\":\"2024-08-26T12:49:16Z\",\"attempted_auto_retries_count\":0,\"webhook_id\":\"28374\",\"site_id\":\"205\",\"environment\":\"main\",\"is_environment_primary\":true,\"entity_type\":\"maintenance_mode\",\"event_type\":\"change\",\"entity\":{\"id\":\"maintenance_mode\",\"type\":\"maintenance_mode\",\"attributes\":{\"active\":false}},\"related_entities\":[]}",
"response_status": 200,
"response_headers": {
"via": "1.1 vegur, 1.1 37c0945d19329fccc23efb283d01aa06.cloudfront.net (CloudFront)",
"date": "Fri, 27 Jul 2018 11:59:20 GMT",
"server": "gunicorn/19.6.0"
},
"response_payload": "ok",
"attempted_auto_retries_count": 2,
"last_sent_at": "2016-09-20T18:50:24.914Z",
"next_retry_at": "2016-09-20T18:50:24.914Z",
"status": "success"
},
"relationships": {
"webhook": {
"data": {
"type": "webhook",
"id": "312"
}
}
}
},
"included": [
{
"type": "webhook",
"id": "312",
"attributes": {
"name": "Item type creation/update",
"url": "https://www.example.com/webhook",
"enabled": true,
"headers": {
"X-Foo": "Bar"
},
"events": [
{
"entity_type": "item",
"event_types": [
"update"
]
}
],
"http_basic_user": "user",
"http_basic_password": "password",
"custom_payload": "{ \"message\": \"{{event_type}} event triggered on {{entity_type}}!\", \"entity_id\": \"{{#entity}}{{id}}{{/entity}}\"] }",
"payload_api_version": "3",
"nested_items_in_payload": true,
"auto_retry": true
}
}
]
}