Webhooks
What are webhooks?
Webhooks allow you to build or set up integrations which subscribe to certain events that happen on the Strateos platform. When one of these events occurs, we will send an HTTP POST to the specified web hook URL. Examples of events that support webhooks include:
- Being notified of a run instruction completing
- Being notified of a run status being updated
Being notified of these events means that you can create tools such as a bot that posts the run status to an application like Slack or a worker that automatically fetches data for analysis once the run completes.
Web hooks are intended to notify you that an event has occurred, but often the data sent in the web hook is not sufficient for you to take subsequent action. A typical web hook handler will receive the event and then make calls to our API to get more information or trigger downstream actions.
Creating a webhook
Webhooks are currently scoped to the project level so all runs within the project will trigger events to be sent to the webhook URL.
To provide a project with a webhook URL when in the project page click the cog icon in the top-right. Here a field is available for a webhook URL.
Payloads
All webhook payloads contain the following structure. Additionally, depending on the operation there may be some additional fields on the event object, shown below in the events table
{
"run": {
"id": "r19a428rm8tbp",
"title": "pGFP lower concs Transform, Spread, Pick on 2016-03-11"
},
"project": {
"id": "p18sjzxaeaff9",
"name": "Demo Project"
},
"event": {
"op": "{{OPERATION_NAME_HERE}}"
}
}
Events pushed to the webhook URL
All the events that are currently supported are run centric
Name | Description | Additional fields |
---|---|---|
instruction_completed | An instruction like cover or thermocycle has completed | id - The ID of the instruction sequence_no - The sequence number of the instruction in the run * completed_at: The timestamp of when the instruction was completed |
run_started | A run has started | None |
run_completed | A run has completed | None |
Updated over 2 years ago