Webhooks. 9 operations.
9 of them work. Each needs a bearer token with its scope. All operations.
Operations
POST/api/v1/webhooks/endpoints/{id}/deletewebhooks.delete-endpointwebhooks.write
GET/api/v1/webhooks/deliveries/{id}webhooks.get-deliverywebhooks.read
GET/api/v1/webhooks/deliverieswebhooks.list-deliverieswebhooks.read
Parameters
endpointquery | integerOnly the deliveries of this endpoint. |
statusquery | stringOnly deliveries in this status: pending, delivered, failed or skipped. |
typequery | stringOnly deliveries of this type of event. |
fromquery | stringOnly deliveries made at or after this time, in RFC 3339. |
afterquery | stringThe cursor of the page: the next of the page before; the newest delivery when left out. |
limitquery | integerThe most deliveries in the page: 1 to 500; 100 when left out. |
Answer
Errors: 401, 403, 405, 422, 429
curl -X GET -H "Authorization: Bearer $TOKEN" https://yourshop.example/api/v1/webhooks/deliveries
GET/api/v1/webhooks/endpointswebhooks.list-endpointswebhooks.read
POST/api/v1/webhooks/replaywebhooks.replaywebhooks.write
POST/api/v1/webhooks/endpoints/{id}/rotate-secretwebhooks.rotate-secretwebhooks.write
POST/api/v1/webhooks/endpointswebhooks.save-endpointwebhooks.write
POST/api/v1/webhooks/endpoints/{id}/testwebhooks.send-testwebhooks.write
POST/api/v1/webhooks/endpoints/{id}/enabledwebhooks.set-enabledwebhooks.write
Schemas 13
Deletion
Deletion is what a delete deleted: the slug of the category, the collection or the content page that is gone, or the name of the image.
deletedrequired | string |
WebhookAttempt
WebhookAttempt is one try of a delivery: when, the status the receiver gave (0 for none), the first 1 KiB of its answer, how long it took in milliseconds, and the error of a try that got no answer.
answer | string |
atrequired | string (date-time) |
duration_msrequired | integer |
error | string |
nrequired | integer |
statusrequired | integer |
WebhookDeliveriesPage
WebhookDeliveriesPage is a page of the log and where the next one starts.
deliveriesrequired | array of WebhookDelivery |
morerequired | boolean |
nextrequired | string |
WebhookDelivery
WebhookDelivery is one event for one endpoint, and where it stands.
attemptsrequired | integer |
created_atrequired | string (date-time) |
done_at | string (date-time) |
endpointrequired | integer |
eventrequired | integer |
idrequired | integer |
last_error | string |
last_statusrequired | integer |
next_at | string (date-time) |
objectrequired | string |
replay_of | integer |
statusrequired | string |
typerequired | string |
WebhookDeliveryDetail
WebhookDeliveryDetail is a delivery with the exact payload sent, as text, and its tries in order.
attemptsrequired | integer |
created_atrequired | string (date-time) |
done_at | string (date-time) |
endpointrequired | integer |
eventrequired | integer |
idrequired | integer |
last_error | string |
last_statusrequired | integer |
next_at | string (date-time) |
objectrequired | string |
payloadrequired | string |
replay_of | integer |
statusrequired | string |
triesrequired | array of WebhookAttempt |
typerequired | string |
WebhookEnabledRequest
WebhookEnabledRequest turns an endpoint on (its trouble cleared, and the events from now on sent) or off.
enabledrequired | boolean |
WebhookEndpoint
WebhookEndpoint is an address the store tells of its events, as the operations show it. It never holds the secret: that is given once, by the save that makes the endpoint and by a rotation.
consecutive_failuresrequired | integer |
cooling_until | string (date-time) |
created_atrequired | string (date-time) |
created_byrequired | string |
description | string |
disabled_at | string (date-time) |
disabled_reason | string |
enabledrequired | boolean |
idrequired | integer |
previous_secret_until | string (date-time) |
typesrequired | array of string |
urlrequired | string |
WebhookEndpointRequest
WebhookEndpointRequest makes an endpoint (ID 0) or changes one (ID its id): its address (https; a store in the test environment also takes http to localhost), its description (at most 100 characters) and the types it chooses, at least one, each of EventTypes or "*". A type whose scope the caller does not hold is refused (403 at the door).
description | string |
id | integer |
typesrequired | array of string |
urlrequired | string |
WebhookEndpointSaved
WebhookEndpointSaved is the answer of a save: the endpoint, and, for the save that made it, its secret, `whsec_` and 43 characters, which is given this once.
endpointrequired | WebhookEndpoint |
secret | string |
WebhookReplayRequest
WebhookReplayRequest asks for the replay of one delivery (Delivery), or of every delivery of an endpoint that failed or was skipped since a time (Endpoint and Since; at most 1000 a call). Exactly one of the two is given.
delivery | integer |
endpoint | integer |
since | string (date-time) |
WebhookReplayed
WebhookReplayed are the new deliveries a replay made.
deliveriesrequired | array of integer |
truncatedrequired | boolean |
WebhookSecret
WebhookSecret is the new secret of a rotation, given this once, and until when the one before it still signs beside it.
previous_valid_untilrequired | string (date-time) |
secretrequired | string |
WebhookTestResult
WebhookTestResult is what the endpoint answered to the test ping: its status (0 for none), the first 1 KiB of its answer, how long it took in milliseconds, and the error of a call that got no answer. OK is true for a 2xx.
answer | string |
duration_msrequired | integer |
error | string |
okrequired | boolean |
statusrequired | integer |
Made from engine/internal/openapi/openapi.json at commit 6c4cbd921. The contract-only operations come from the engine’s stub file, engine/internal/ops.