Maintenance endpoints
Read scheduled maintenance publicly and manage windows with an admin token.
Visitors can read upcoming maintenance at /maintenance. To schedule or
change a window over HTTP, send an admin bearer token to /admin/maintenance.
If maintenance is disabled,
all these routes return 404 { "error": "This feature is disabled." }.
GET /maintenance
Returns upcoming and in-progress windows. Completed work doesn't appear in this public list.
The returned status follows the clock when you read the list; you don't
need to update a window just because its start time has passed. This automatic
status refresh does not send maintenance.starting or
maintenance.completed notifications. Those are sent on admin create or
PATCH requests according to the resulting status.
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 API agree immediately rather than after the TTL.