A monitor is a webhook endpoint that accepts file uploads and compares them automatically against a linked contract.
How monitors work
- You create a monitor and link it to a contract.
- DriftOps generates a unique webhook token.
- Your pipeline or trading partner POSTs files to
https://api.driftops.io/api/webhook/{token}. - DriftOps receives the file, parses it, and runs a comparison.
- If differences are found, a drift event is created.
- If Slack is configured, a notification is sent.
No authentication credentials are needed on the sender side. Security is provided by the token being unique and unguessable (32 bytes of cryptographically random data, URL-safe encoded).
Creating a monitor
- Go to Monitors and click New Monitor.
- Enter a name for the monitor.
- Select the contract to compare against.
- Optionally enter a description and a per-monitor Slack webhook URL.
- Click Create.
The monitor page shows the full webhook URL after creation.
Sending files
curl -X POST https://api.driftops.io/api/webhook/{token} \
-F "file=@your_document.json"
The file must be sent as a multipart form upload with the field name file.
Python example:
import requests
with open("document.json", "rb") as f:
response = requests.post(
"https://api.driftops.io/api/webhook/{token}",
files={"file": f}
)
print(response.status_code, response.json())
Node.js example:
const FormData = require("form-data");
const fs = require("fs");
const axios = require("axios");
const form = new FormData();
form.append("file", fs.createReadStream("document.json"));
axios.post("https://api.driftops.io/api/webhook/{token}", form, {
headers: form.getHeaders()
});
Supported file types
Format is detected from file content, not just the extension. File size limit: 30 MB per upload.
Rate limiting
Each webhook token is limited to 20 requests per minute.
Requests that exceed the limit receive a 429 Too Many Requests response. The window resets automatically after 60 seconds.
If your integration sends files at a higher rate, consider batching or using a cloud connection with a polling interval instead.
Slack notifications
Set a per-monitor Slack webhook URL to override the organization-level Slack setting for that specific monitor. Useful when different teams own different monitors and need separate Slack channels.
To configure: edit the monitor and enter the Slack webhook URL in the notifications field.
Disabling a monitor
Set the monitor to inactive via the toggle on the monitor detail page.
Inactive monitors return 403 Forbidden to any incoming webhook request. The token is preserved and can be reactivated at any time.
Deactivating a monitor does not delete its drift event history.