Custom Webhooks
Custom webhooks are triggered by Steadybit whenever an experiment has progressed or the killswitch's status changes.
Configure
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
.
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
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.
Supported Events
You can decide to react to the following events individually or get informed about all events.
Experiment Executions
The body contains the event identifier (event
), the time
, and the experiment execution
(see below).
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
Killswitch
The body contains the event identifier (event
), the time
and the killswitch
's state (see below).
Engaged Emergency Stop
killswitch.disengaged
Disengaged Emergency Stop
killswitch.engaged
Developing Webhooks
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
.
Examples
This section covers some example requests to ease developing the webhook endpoint.
Experiment Execution Created
The request body that is sent to your endpoint depends on the specific experiment that is executed.
Killswitch Disengaged
Verify Webhook Requests
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:
Last updated