Page cover image

Webhook

Principles

A webhook is an HTTP endpoint that will be called by the BlurIt API when the status of a job changes. Webhooks are the preferred way to be notified of a status change as it eliminates the needs to periodically call the GET /innovation-service/anonymization route to get a job status.

When using webhooks, you’re in charge of developing the endpoint with respect to the specifications (see below) and making the endpoint available on the Internet. The endpoint must no be secured with IP filtering or other similar security controls.

Create you webhook endpoint

To process webhooks, you need to:

  1. Expose an endpoint on your server

  2. Configure your endpoint on your customer manager or directly from our API.

  3. Handle webhook events

Step 1

To receive webhook events you need to develop an endpoint which can receive a HTTP POST call.

Step 2

Configure your endpoints in your manager developer section, or with our webhook API (see Add your endpoint in our system).

NOTE: you cannot configure more than 5 endpoints.

Step 3

When we deliver a webhook event to your server:

  1. First check if the X-Auth-Token header exists in the request and that its value is the same as the one we provided to you during the creation of the endpoint (see Setting up with the Manager). If the header is not present or do not match the one that is configured for your endpoint, reject the call.

  2. Process the request to extract the taskId and the status (see Request format below)

  3. Acknowledge the webhook event (see Response format below). Warning : if you don't respect the response format, we might stop calling your endpoint and you may not receive further notifications.

  4. Apply your business logic

Webhook specifications

Request format

The requests made to your endpoint will be formatted as follow:

{
    "taskId": "XXXXXXXXXXX",
    "status": "XXXXX"
}

status can have the following values: Sent, Started, Succeeded, Failed

Response format

Your endpoint must send a 200 OK response formatted as follow:

{
    "taskId": "XXXXXXXXXXX"
}

Workflow

  • POST /innovation-service/anonymization to create a anonymization job. The route will return a unique job ID.

We will then send you POST requests to your endpoint to notify you when the status of the task changes.

  • GET /innovation-service/anonymization?anonymization_job_id={{your_job_id}} . To get the url of the processed le.

  • GET /innovation-service/result/{fileName} to download the actual processed media.

Add your endpoint in our system

Once you have developed your endpoint route, you can add its URL either in the Manager (see Setting up with the Manager) or by calling an API route (see Setting up with API calls).

Last updated