Webhooks
Learn to use webhooks for static site generation.
Optimizely Graph webhooks notify your applications when content changes, so workflows such as static site generation (for example, Gatsby) stay up to date without manual rebuilds. Use webhooks to drive automated pipelines that react to bulk sync events and to expired content in Optimizely Content Management System (CMS).
NoteRefer to the API Reference or Manage webhooks page for webhook management information.
bulk event
bulk eventThe bulk event signals that Optimizely Graph finished processing a chunk of synced content. Subscribe to this event to trigger downstream pipelines, such as a static site generator, as soon as the latest content batch is ready.
Optimizely Graph gathers and organizes content into chunks during the sync job before sending it to the remote server. Each chunk represents a bulk of data, and a single sync job cycle generates one or more chunks. When Optimizely Graph finishes processing each chunk, it emits an event and an identifier. The event activates your static site generation pipeline to build pages with up-to-date data.
{
"id": "<event-id>",
"timestamp": "<event-time>",
"tenantId": "<tenant-id>", // ContentGraph instance id
"type": {
"subject": "bulk",
"action": "completed"
},
"data": {
"journalId": "<journal-id>"
}
}expired event
expired eventThe expired event notifies your applications when content reaches its stop-publish date in Optimizely CMS. Subscribe to this event to keep downstream systems aligned with the published content set in CMS without polling for changes.
In Optimizely CMS, the StopPublish field marks content as expired. Optimizely Graph does not retrieve expired content with the single public key. You receive one notification with the expired event for expired content, using a sliding window of one hour.
{
"id": "<event-id>",
"timestamp": "<event-time>",
"tenantId": "<tenant-id>", // ContentGraph instance id
"type": {
"subject": "doc",
"action": "expired"
},
"data": {
"docId": "<doc-id>"
}
}Updated about 15 hours ago
