Incident and maintenance endpoints
Read incidents and windows publicly; create and manage them with a token.
Reads are public; every mutation lives behind /admin/*. Both groups return
404 { "error": "This feature is disabled." } when their feature is off.
GET /incidents
| Query | Type | Notes |
|---|---|---|
status | investigating, identified, monitoring, resolved | comma-separated |
severity | minor, major, critical | comma-separated |
from | ISO-8601 | inclusive lower bound |
to | ISO-8601 | inclusive upper bound |
limit | non-negative integer | |
offset | non-negative integer |
GET /incidents/:id
One incident with its timeline, or 404 { "error": "Incident not found." }.
POST /admin/incidents
Non-empty; trimmed.
Trimmed and de-duplicated. An empty array means global.
The first timeline entry.
Defaults to investigating. Creating one as resolved is rejected.
Returns 201 with the created incident and dispatches incident.created.
POST /admin/incidents/:id/updates
Append a timeline entry — the normal way to progress an incident.
| Field | Required | Notes |
|---|---|---|
status | yes | Any incident status, including resolved. |
message | yes | Timeline text. |
severity | no | Changes severity with this entry. |
Dispatches incident.resolved for resolved, otherwise incident.updated.
PATCH /admin/incidents/:id
Edit fields without writing a narrative update. Omitted fields keep their
current value, and message defaults to "Incident details updated.".
DELETE /admin/incidents/:id
204 on success, 404 if unknown. Deletion removes the incident and its
timeline; it does not emit an event. Prefer resolving — a deleted incident
disappears from the public history and from the feeds.
GET /maintenance
Upcoming and in-progress windows. Completed ones are never published.
status is derived from the clock each time the list is read.
POST /admin/maintenance
Empty means every monitor.
Must be after scheduledStart.
Returns 201 and dispatches maintenance.scheduled, maintenance.starting
or maintenance.completed depending on the derived status.
PATCH /admin/maintenance/:id
Any subset of title, description, affectedMonitors, scheduledStart,
scheduledEnd and status. An empty body is rejected with
400 { "error": "At least one field must be provided." }.
DELETE /admin/maintenance/:id
204 on success, 404 if unknown.
The cached snapshot is dropped on each write, so the page and the API agree immediately rather than after the TTL.