HomeDev guideRecipesAPI ReferenceGraphQL
Dev guideUser GuideGitHubNuGetDev CommunitySubmit a ticketLog In
GitHubNuGetDev CommunitySubmit a ticket

Webhooks

Describes how to use webhooks for static site generation

Optimizely Graph gets a notification when something is updated for a specific account, so a static site generator (such as Gatsby) can be notified using webhooks.

πŸ“˜

Note

Refer to the API Reference for information on managing webhooks.

Bulk completed

During the synchronization job, the contents are gathered and organized into chunks before being sent to the remote server. Each chunk represents a bulk of data, and within one synchronization job cycle, multiple chunks may be generated by the system. Once Optimizely Graph finishes processing each chunk, it emits an event along with an event identifier. You can utilize this event to activate your static site generation pipeline, allowing you to generate 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 content

In the Optimizely Content Management System (CMS), you can set content to expired with the StopPublish field. If there is expired content, it is not retrieved in Optimizely Graph with the single public key. You get one notification once with the Expired event when there are expired content items 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>"
  }
}