Sync Lifecycle Webhooks
Last updated
Was this helpful?
Last updated
Was this helpful?
Sync Lifecycle Webhooks provide a way to connect external systems to Census to listen for events related to a sync lifecycle, including . Webhooks can be configured in Workspace settings under the Webhooks tab.
Configure a new webhook under the Webhooks tab by clicking Add Webhook and providing:
Name - Required name for your webhook
Description - Optional additional details or description for your webhook
Endpoint - Required endpoint to which Census should send payloads to
Events - Subscribe to at least one of the supported events (See below)
Once you click Create, a one-time secret will be shown that you may use to validate the authenticity of the payloads you receive. Note that this secret will not be accessible later and it is recommended you make a copy of it.
There are two main categories of events a webhook can subscribed to: sync alert events and sync run lifecycle events.
Sync Alert Events
sync.alert.raised - when any subscribed sync alert in your workspace is triggered
sync.alert.resolved - when any subscribed sync alert is resolved
Sync Run Lifecycle Events
sync.triggered - when a sync run has been queued
sync.started - when active work on the sync run has started
sync.completed - when the sync run has completed, for both succesful and failed sync runs
sync.success - when a sync run is completed successfully
sync.failed - when a sync run has failed
To verify the webhook payloads your server receives are actually coming from Census, use the secret from the creation flow to validate each payload. Each payload will include a HMAC-SHA256 X-Signature
header calculated using the payload and secret token.
Example Python code for validating payloads:
If your server does not respond with a 2xx status, Census will retry sending the payload up to 5 times. It will wait 4 seconds before retrying the first time, and increasing the wait time before the next retry. The chart below shows the delay between each retry.
1
4.0
2
8.0
3
16.0
4
32.0
5
64.0
Additionally, each payload delivery has a timeout of 10 seconds. If the server does not respond within this time, it will be considered as a failed delivery.
See our .