API: private locations and SLAs
Add private locations and their probes from code, and set service levels and read their reports.
Private locations
A private location is a region of your own, inside your network, where probes you run check what the public regions cannot reach (Private locations). Making locations and probes needs an admin token.
curl -sS -X POST "$HEIMDALL/locations" \
-H "Authorization: Bearer $HEIMDALL_API_TOKEN" -H "Content-Type: application/json" \
-d '{"name": "Office", "slug": "office"}'{
"id": "prv-82k18wyx-office",
"name": "Office",
"private": true,
"probes": [],
"probes_online": 0,
"monitors": 0,
"suspended": false,
"created_at": "2026-10-27T20:13:43Z"
}curl -sS -X POST "$HEIMDALL/locations/prv-82k18wyx-office/tokens" \
-H "Authorization: Bearer $HEIMDALL_API_TOKEN" -H "Content-Type: application/json" \
-d '{"name": "rack-1"}'{
"id": "01JC4QG8M1P4S7V0Y3B6E9H2K5",
"prefix": "hpt_Gj3p",
"token": "hpt_Gj3pV5boA3Fqd8bdyq1f3Z7BrTWRLPIJX6-PlovBnJg",
"server_url": "https://heimdall.warewave.tech"
}- The probe’s
tokenis in this answer only: hand it to the probe (its configuration, or the container’s environment — Private locations) and nowhere else. - Use the location’s
idin a monitor’sregions. DELETE /locations/{id}/tokens/{tokenId}removes a probe — it stops within seconds;DELETE /locations/{id}removes the location once no monitor uses it.GET /locationslists them with the probes seen and when.
Service levels (SLA)
A service level holds a service to a target over calendar periods and says how much downtime is left (Service levels). It comes with Business; a write token makes and changes them.
curl -sS -X POST "$HEIMDALL/slas" \
-H "Authorization: Bearer $HEIMDALL_API_TOKEN" -H "Content-Type: application/json" \
-d '{
"name": "API",
"target": 99.9,
"period": "month",
"timezone": "Europe/Istanbul",
"monitor_ids": ["01JC4Q8Z2M7V3K9X5T1R6B0WAP"],
"notify_user_ids": ["email:ayse@example.com"]
}'{
"id": "01JC4QH5P8S1V4Y7B0E3H6K9N2",
"name": "API",
"target": 99.9,
"period": "month",
"timezone": "Europe/Istanbul",
"monitor_ids": ["01JC4Q8Z2M7V3K9X5T1R6B0WAP"],
"notify_user_ids": ["01JC4Q7SZ9C2F5H8K1N4Q7T0W3"],
"report_mail": true,
"budget_mail": true,
"current": {
"key": "2026-10",
"from": "2026-09-30T21:00:00Z",
"to": "2026-10-31T21:00:00Z",
"allowed_seconds": 2678,
"down_seconds": 312,
"used": 0.12,
"state": "on_track",
"running": true
}
}- Either
monitor_ids(up to 50) orcomponent_id(a status page component, its monitors as the page has them). period:month,quarteroryear, intimezone;target90–99.999. Incurrent,usedis downtime ÷ allowance (above 1 when it was passed) andstateison_track,at_risk(75 % used) orbreachedwhile the period runs,metormissedafter it.GET /sla-reports/2026-10is the month’s report as JSON;/pdfand/csvthe same as a file:
curl -sS -o sla-2026-10.pdf "$HEIMDALL/sla-reports/2026-10/pdf" -H "Authorization: Bearer $HEIMDALL_API_TOKEN"
curl -sS -o sla-2026-10.csv "$HEIMDALL/sla-reports/2026-10/csv" -H "Authorization: Bearer $HEIMDALL_API_TOKEN"