You're reading "Content Management API"

Webhook call

Represents a log entry in the webhooks activity list.

The Webhook call object

A Webhook call object is returned as part of the response body of each successful Index API call. The following table contains the list of all its fields along with their type, description and example values.

Object fields:
created_atstring

The moment the call occurred

This attribute is required
entity_typestring

The subject of webhook triggering

This attribute is required
event_typestring

The event that triggers the webhook call

This attribute is required
request_headersobject

The request's headers

This attribute is required
request_payloadstring

The body of the request

This attribute is required
request_urlstring

The url that the webhook called

This attribute is required
response_headersobject

The response's headers

This attribute is required
response_payloadstring

The body of the response

response_statusinteger

The status of the response

List all webhooks calls

To list all webhooks calls, send a GET request to the /webhooks/calls endpoint. The following table contains the list of all the possible arguments, along with their type, description and examples values. All the arguments marked as required must be present in the request.

Example request
GET https://site-api.datocms.com/webhooks/calls HTTP/1.1
X-Api-Version2
AuthorizationBearer YOUR-API-KEY
Acceptapplication/json
Example response
HTTP/1.1 200 OK
Content-Typeapplication/json; charset=utf-8
Cache-Controlcache-control: max-age=0, private, must-revalidate
X-RateLimit-Limit30
X-RateLimit-Remaining28
{ "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": "{ \"entity_type\": \"item\", \"event_type\": \"update\", \"entity\": { \"id\": \"293467\", \"type\": \"item\", \"attributes\": { \"created_at\": \"2018-05-22T10:13:00.461Z\", \"updated_at\": \"2018-07-30T14:13:50.068Z\", \"is_valid\": true, \"avatar\": { \"path\": \"/205/1526984443-untitled-drawing.png\", \"format\": \"png\", \"size\": 242630, \"alt\": null, \"title\": null, \"width\": 329, \"height\": 286 }, \"name\": \"3Francesco Falchy\", \"gallery\": [] }, \"relationships\": { \"item_type\": { \"data\": { \"id\": \"1423\", \"type\": \"item_type\" } }, \"published_version\": { \"data\": { \"id\": \"670532\", \"type\": \"item_version\" } }, \"current_version\": { \"data\": { \"id\": \"670532\", \"type\": \"item_version\" } } } } }", "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" }, "relationships": { "webhook": { "data": { "type": "webhook", "id": "312" } } } } ] }