Get an event subscription delivery
const url = 'https://api.getsitecontrol.com/v1/sites/1/event-subscriptions/1/deliveries/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.getsitecontrol.com/v1/sites/1/event-subscriptions/1/deliveries/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0 \ --header 'Authorization: Bearer <token>'One delivery with the request as sent and every attempt: status code, outcome, error and the first 16 KB of the receiver’s answer. In the request, URL query values, Authorization, Cookie and secret headers read ***. accepted means the receiver answered 2xx, 302 or 303, not that it processed the event.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Event subscription id from list_event_subscriptions
Event subscription id from list_event_subscriptions
Delivery id from list_event_subscription_deliveries or test_event_subscription; the receiver got it as the webhook-id header
Delivery id from list_event_subscription_deliveries or test_event_subscription; the receiver got it as the webhook-id header
Responses
Section titled “Responses”object
Delivery id, sent as the webhook-id header: the same on every retry, new on a redelivery
id of the event in the payload: the same for every event subscription and every redelivery of the event
Null once the event is purged
True for a delivery of test_event_subscription
Pending: waiting for an attempt or being sent; succeeded: accepted by the
receiver; failed: given up, see outcome; cancelled: dropped before sending
because the event subscription was deleted, switched off or saved since, or
its URL host changed.
How a finished delivery ended. accepted: the receiver answered 2xx, 302 or 303, which is not proof it processed the event; rejected: another 4xx, or 301, 307, 308 and other 3xx (the receiver moved, see the attempt’s location), not retried; gone: 410; retry_exhausted: every retry failed; expired: no time left for a retry; rate_limited: the receiver’s 429 pause ran past the deadline; invalid_request: the request could not be built, e.g. a template failed on the event (last_error says why); private_network_block: the host resolved to a private address; cancelled: see status. More values may appear
Requests sent so far
HTTP status of the last attempt’s answer; null without an answer
What went wrong last, e.g. HTTP 500 or render failed: ...
When the next attempt is due; null once finished
When it finished; null while pending
The delivery this one redelivers
The request as stored, masked
object
With placeholders filled; in the journal query values read ***
Content-Type sent
Headers set on the event subscription; secret ones read ***, and in the journal Authorization and Cookie too. The webhook-* signature headers are added when sending
object
The body as sent, as text
Every attempt, the first one first
object
1 for the first request of a delivery
Accepted: 2xx, 302 or 303; retryable: 408, 5xx, a timeout or a network error, may be tried again; rate_limited: 429; rejected: another 4xx, or 301, 307, 308 and other 3xx; gone: 410. More values may appear
HTTP status of the receiver’s answer; null without an answer
The first 16 KB of the receiver’s answer
True when the answer was longer than response_body
The receiver’s Retry-After header, honoured for the next try
The receiver’s Location header; redirects are not followed
What went wrong, e.g. HTTP 500 or a network error
{ "status": "pending"}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Authentication scheme: Bearer
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
event_subscription_not_found: no event subscription with this id on the site; delivery_not_found: no delivery with this id in the event subscription’s journal; site_not_found: no such site
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds
Seconds until the bucket refills
The documented shape of every error body on the versioned surface.
object
object
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "reason": "example", "next": "example", "request_id": "example", "errors": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ], "metadata": {}}Headers
Section titled “Headers”API version the response was produced for
Request id, echoed from the request when valid
Limit of the tightest bucket
Requests left in its window
End of its window, epoch seconds