Skip to content

Webhooks

This group of endpoints allows the user to subscribe to a webhook that will send a notification whenever a new track is detected by our platform. This can be achieved via the new-tracks webhook.

In order to use the webhooks the user must setup an HTTP URL to receive the notifications. This endpoint URL must be capable of receiving POST requests.

Subscribing to the Webhook

To subscribe to a webhook, use the endpoint POST /subscribe/{process_uuid}. The request body must be as follows:

{
  "notification_url": "https://example.com/notify",
  "event_type": "new-tracks",
  "auth_url": "https://example.com/login",
   "notifier_policy_args": {
    "backoff_seconds": 5
  },
  "notifier_policy_type": "backoff",
  "notification_format": "full"
}

In this template, the notification_url will be the HTTP URL of your system. The auth_url is optional and will only be needed if your endpoint requires an specific login process. In such case, please, contact support@senseaeronautics.com.

The notification policy may also be configured. The backoff policy allows choosing the minimal interval between alerts.

Subscriptions are limited by type and notification url, i.e., you may only register one alert of each type for each notification url.

Use GET /subscriptions/{process_uuid} to get all the active subscriptions. To remove a subscription, use DELETE /subscriptions/{process_uuid} and provide the notification url and event type.

Message format may also be configured. Available formats are listed in the endpoint schema and an example is provided in the webhooks section of the swagger.

Webhook response

The body of the webhook post message is detailed in the swagger under the Webhooks section. For instance, the new-tracks (simple) body looks like this:

{
"process_uuid": "e369c784-5100-49e8-8098-75d35c47b31b",
"timestamp": "2024-12-12 00:00:00.1234",
"type": "new-tracks",
"track_count": 2,
"detections": [
    {
        "topLeftX": 100,
        "topLeftY": 150,
        "height": 80,
        "width": 60,
        "id": 1,
        "class": 2
    },
    {
        "topLeftX": 200,
        "topLeftY": 100,
        "height": 120,
        "width": 90,
        "id": 7,
        "class": 3
    }
]

}

If you need a custom format to accommodate an existing implementation, please contact us at support@senseaeronautics.com

For further information about the webhooks, visit the ATR SenseAeronautics' API Swagger Documentation.