Superadmins manage every status. Others manage the statuses of hosts in zones where they have
records.write, and see those of zones they can read (zones.read). A host in none of DNZ’s zones
is superadmin-only, so a token can’t reach it.Endpoints
A status
The body ofPOST and PUT:
Answers add
id, zone_id, zone, state (active, scheduled, ended or off), code,
label, retry_after (seconds right now, or null), proxies ([{"id", "name"}], the proxies
serving the host), updated_by, created_at and updated_at.
GET /api/status-pages/hosts answers {"items": [{"host", "zone_id", "zone", "proxies"}]}. Each
entry of kinds has kind, label, code, title and message ({host} is filled in on the
page).
Example
Preview
GET /api/status-pages/preview renders the page with kind and, optionally, host, title,
message, link, redirect_to, ends_at and proxy. It answers HTML, JSON or text by Accept,
like the proxy does.
Errors
Errors come back as{"error": "…"}: 400 for a name no proxy serves or a field that doesn’t check
out, 403 without the permission, 404 for a status you can’t see, 409 when the host already has
a status.