The webhook execution modes
A webhook is a way for a service to provide other applications with real-time information. The service makes a web request using the information included in the webhook. For example, you might want to invoke a webhook after a Sitecore content publish, so that you can automatically trigger static site generation, cache clearing, and other automated activities that support webhooks.
When you use Edge runtime publishing (v2), fewer webhooks are triggered for a publishing job. This is because Edge runtime publishing (v2) publishes fewer items compared to snapshot publishing (v1).
There are various JSON objects used with the webhooks endpoint of the Edge Admin API.
The webhook execution mode determines how and when the webhook is executed. For Experience Edge there are two execution modes:
-
OnEnd - default option. In this mode, the webhook is executed at the end of the publishing job. You can set a content-type header in the headers of the webhook to specify the format of the body, for example,
text/plainorapplication/json. -
OnUpdate - includes the entity changes that caused the webhook to execute. The request body is
application/json.