Registering a Webhook
Webhook registration is done by submitting a
WebhookCriteria manifest to ReliablyHQ. This manifest contains the criteria needed to match an entity to your requirements, and then invoke a URL.
An example of the manifest can be found here.
The payload sent to the webhook is the entity that triggered the event.
- The webhook URL must be available to the public internet.
- The webhook URL must be able to accept a
1. Create a manifest
A webhook that is triggered when an
ObjectiveResult that has a label
service:my awesome service is created should look like this:
apiVersion: reliably.com/v1 kind: WebhookCriteria metadata: labels: name: my awesome webhook service: my awesome service spec: url: https://myurl.org trigger: event_type: created api_version: reliably.com/v1 kind: ObjectiveResult labels_selector: service: my awesome service
2. Send the manifest to ReliablyHQ
$ reliably slo sync -m webhook.yaml
Information about the event and the context that created it is added to the request headers. You can use these request headers to aid in your processing, and to associate them back to ReliablyHQ.
|x-reliablyhq-event-type||The type of the event that caused the webhook to be invoked.|
|x-reliablyhq-event-created-at||The time (in ISO format) that this event was created.|
|x-reliablyhq-entity-kind||The kind of entity that triggered this webhook invocation.|
|x-reliablyhq-entity-api-version||The API Version of the entity that triggered this webhook invocation.|
|x-correlation-id||A string that is associated with the context that this invocation came from. This is useful for debugging and should be included in any support requests you make.|
- Webhooks will be required to use the HTTPS protocol, with a valid SSL certificate.
- Webhook payload verification using the
signcapability of nacl.