Skip to main content
Ontoto can push data to an HTTP endpoint you host. Register the endpoint in the Ontoto Dashboard under Developer → Export Destinations → HTTP Endpoints, then attach it to an export. An endpoint has a URL, a method, static request headers such as an Authorization token, and an optional signing secret. Ontoto sends the payload as the raw body of a POST or PUT request. Exports send two kinds of payload:
  • File exports send the generated file as the body, with its path in X-Ontoto-File-Path.
  • Events send a small JSON body built by the export function, with no file. They suit a fetch-on-notify integration. For example, an export that runs when a device transmits tells your backend that new data has arrived, and your backend then fetches the readings through the sensor data API.
Signed requests follow the Standard Webhooks specification, so an off-the-shelf standard-webhooks library, available in most languages, can verify them for you.

Request headers

Every delivery carries these envelope headers: Static headers configured on the endpoint, such as Authorization, go out unchanged on every request. File and event exports add their own headers on top of the envelope: Ignore headers and webhook-signature versions you do not recognise. New export types and signature versions add entries without removing existing ones. The export generation history on the Exports page also logs each delivery’s webhook-id.

Verifying the signature

The signing secret shown when you configure the endpoint uses the Standard Webhooks whsec_<base64> format. The simplest check is a standard-webhooks library:
To verify manually instead:
  1. Read webhook-timestamp and check it is within your replay window. The reference libraries default to 5 minutes either side of your server clock.
  2. Base64-decode the secret after the whsec_ prefix. Those bytes are the HMAC key.
  3. Compute the base64 HMAC-SHA256 over the UTF-8 bytes of {webhook-id}.{webhook-timestamp}.{raw body}. Use the raw body bytes exactly as received.
  4. Compare the result against each v1,<signature> entry in webhook-signature with a constant-time comparison. Accept the request if any entry matches.

Why the replay window matters

The signature proves who sent a request and that nobody altered it. It does not prove when. Without a time check, a captured request would pass verification every time someone resent it. The timestamp is part of the signed content, so an attacker cannot change it without breaking the signature, and an old request replayed outside your window fails. Use webhook-id to deduplicate replays inside the window.

Test requests

The Send test request button in the endpoint dialog sends a small payload, by default the JSON body { "test": true }, through the same pipeline as a real delivery. The static headers, envelope headers and signature match a real delivery, so it tests connectivity, authentication and your signature check end to end.

Responding

Respond with any 2xx status to acknowledge a delivery. Any other status, or no response within 30 seconds, counts as a failed delivery.