Skip to main content

Webhooks

Webhooks in Enterspeed are HTTP callbacks that will send all generated views by schemas with the destinations field to a URL configured in the Webhook. This means that you can decide on the schema level which views you want to send to the webhook.

You will only have to set the destination field on the entity schema you want to send to the webhook. All schema references are automatically resolved so you don't have to set it on all referenced schemas.

It's possible to configure multiple Webhook destinations if you need to push different types of data to different URL endpoints.

Configuration

In order to setup the Webhook configuration you need the following:

SettingDescription
NameA name to identify the webhook
URLThe url to call from the webhook
Access KeyAn API key the client can use to identify that the call is in fact coming from Enterspeed

Request

The request to the client-configured URL will be made with the following configuration.

SettingValueDescription
Retry count3How many times the webhook will try to send the request
Timeout10The request timeout in seconds
HTTP methodPOSTThe requests is made as a POST
HeadersX-Api-Key

X-Enterspeed-Webhook-Name

X-Enterspeed-System
The following headers will be send with the request.

X-Api-Key will hold a key so that the client can validate that the request is actually coming from Enterspeed

X-Enterspeed-Webhook-Name will hold the name of the webhook

X-Enterspeed-System will hold the version number of the webhook

Payload

The request will send the following data.

{
"id": "gid://Environment/2052b78d-6c34-4f11-bea5-296cf2d26968/Source/053b598b-c3d1-46fb-91e3-53115169cdb2/Entity/1234/View/product", // the Enterspeed view id
"originId": "1234", // the origin id of the entity
"type": "product", // mapping schema alias
"action": "Deploy", // can have the value of Deploy or Remove
"url": "https://weu.delivery.enterspeed.com/v2?id=gid://Environment/40bb2d76-3b71-4121-b9b6-238cf4f325c4/Source/9e78f134-cf84-4ec5-9180-0b72b94949be/Entity/1099-en-us/View/home" // the absolute url for the delivery api to fetch the view
}