Ready for webhooks?
Currently, webhooks are only available for paid users and partners. Please contact us to get webhooks set up for your account.
In addition the above resources, we also allow users to set up webhooks and subscribe to Events that occur as your Samples and Analyses are processed by the platform. Events are a record of webhook payloads that have been delivered to relevant subscriptions and only exist if webhooks are configured (i.e., an account without webhooks turned on will have no events). By default, up to 30 days worth of events are available via the v1 API.
Currently, it is possible to subscribe to individual event types or subscribe to all events (
*). Webhooks POST to a specified
https endpoint without authentication and are individually signed and timestamped so that you can verify that the webhooks were sent by One Codex and not a third party (see Checking Signatures). Please contact us in order to get started with webhooks for your account.
Currently the following event types exist:
sample.uploaded: When a sample is successfully uploaded or imported into the One Platform. This event means we have successfully received your data and started to process it.
analysis.succeeded: When an analysis finishes successfully. Successful analyses have a
success: trueproperty and their results may be retrieved via the API (see Retrieve Analysis Results).
analysis.failed: When an analysis finishes but is unsuccessful. Failed analyses will have
/resultsthat result in a
404error and a
success: falseproperty. Note that an
analysis.failedevent may fire multiple times for the same analysis if it is retried by One Codex's processing (it may also
succeedin the future if the failure was due, e.g., to hardware or other unexpected processing issues).
Note that the default "wildcard" subscriptions (
*) may include additional event types in the future. When requesting that webhook setup for your account, please specify if you would like the subscription(s) to listen to all events or only select events.
The event resource contains the following fields:
|The event ID encoded as an addressable URI|
|The webhook payload (as documented below). Note that webhooks will be delivered for a specific API version and that version is noted in the payload via the |
|An enum with one of the following 4 values:|
The webhook payload delivered by our system consists of 5 fields:
|The API version used in generating the representation of the relevant |
|A string with the event type. Note webhooks may be configured to listen to all or only specific event types.|
|A representation of the core object for which the |
|A string representation of the object type. Currently |
|Timestamp for when the event was triggered, encoded as a RFC 3339 timestamp. Note: The |
In production settings, we strongly recommend checking the signatures of any received webhooks to ensure that they originate from One Codex and not a malicious third party. See the following section for details.