Custom Webhooks
Last updated
Last updated
Custom webhooks are triggered by Steadybit whenever an experiment has progressed or the killswitch's status changes.
You can configure custom webhooks at Settings
-> Integrations
-> Custom webhook
. The content type is application/json
, and the message is described in our OpenAPI specification as WebhookPayload
.
You can decide to react to the following events individually or get informed about all events.
The body contains the event identifier (event
), the time
, and the experiment execution
(see below).
Event | Event Identifier | Description |
---|---|---|
The body contains the event identifier (event
), the time
and the killswitch
's state (see below).
A webhook uses an HTTP POST request at an endpoint reachable from the Steadybit platform. The HTTP request sends a body with the content-type application/json
. Our OpenAPI specification describes the exact body in WebhookPayload
.
This section covers some example requests to ease developing the webhook endpoint.
The request body that is sent to your endpoint depends on the specific experiment that is executed.
If a secret is provided a signature of the body is computed using HMAC SHA-256
and sent as X-SB-Signature
http header. You can use this header to verify the message.
Here is an example of doing this in Java:
Event | Event Identifier | Description |
---|---|---|
Name
The name for this integration will not show up in the JSON body.
URL
The URL, which will receive an HTTP Post request with the JSON body
Secret
You may specify a secret that will be used to sign the body. Verifying the signature. optional
Team
If no team is specified, you'll receieve all events. If you do specify a team, you'll only receive events relevant to this team
Events
Choose the events you want to receive.
Created
experiment.execution.created
A new experiment execution was just started. As soon as all required agents have connected, the first step will be executed
Step Started
experiment.execution.step-started
One step of a running experiment started.
Step Completed
experiment.execution.step-completed
One step of a running experiment completed successfully (e.g. a check succeeded or the attack was performed).
Step Failed
experiment.execution.step-failed
One step of a running experiment failed (e.g. a check didn't match the defined expectation).
Step Errored
experiment.execution.step-errored
One step of a running experiment errored (e.g. a check or attack couldn't be executed due to a technical error).
Canceled
experiment.execution.step-canceled
The experiment execution was canceled, e.g., by a user.
Completed
experiment.execution.completed
The experiment completed succesfully, e.g., all steps have been completed successfully.
Failed
experiment.execution.failed
The experiment execution failed because at least one step failed.
Errored
experiment.execution.errored
The experiment execution errored because at least one step errored.
Preflight Checks
experiment.execution.preflight
A preflight webhook check is performed before the experiment is allowed to start.
Engaged Emergency Stop
killswitch.disengaged
The emergency stop was triggered to stop all experiment runs and prevent future runs.
Disengaged Emergency Stop
killswitch.engaged
The emergency stop was disengaged to allow future experiment runs.