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.
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.