An HTTP request to the Cerebrium API can be parameterized to forward data from your function/app to a specified endpoint via a POST. This allows you to use webhooks in your architecture. To achieve this, we can simply add theDocumentation Index
Fetch the complete documentation index at: https://cerebrium-assembly-ai.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
webhookEndpoint
query parameter to any API call:
{"smile": "wave"}. We would then make a POST call from
our proxy that would look like this to your webhook:
We do not actually use
curl. This is used as an example to show what a
webhook may expect.Webhook Signature Verification
To verify that webhooks are genuinely coming from Cerebrium, you can use our webhook signature verification system:- Include an
X-Webhook-Secretheader with a secret value of your choice when making requests to our API - When you receive a webhook, we’ll include the following headers:
X-Request-Id: A unique identifier for the requestX-Cerebrium-Webhook-Timestamp: The Unix timestamp when the webhook was sentX-Cerebrium-Webhook-Signature: The signature in the formatv1,<signature>
- To verify the signature:
The body should include everything returned from cerebrium (run_id, function
response, timestamp etc) not just your function response