Ionhour Docs

Maintenance Windows API

Schedule and manage planned maintenance periods with alert and incident suppression.

Maintenance windows let you suppress alerts and incidents during planned downtime. See Maintenance Windows for conceptual documentation.

Create Maintenance Window

POST /maintenance-windows

Request Body

FieldTypeRequiredDescription
workspaceIdnumberYesWorkspace this window belongs to
namestringYesWindow name
descriptionstringNoDescription of the maintenance activity
startAtstringYesISO datetime when maintenance begins
endAtstringYesISO datetime when maintenance ends
projectIdsnumber[]YesProjects affected by this maintenance
suppressAlertsbooleanNoSuppress alert notifications (default: true)
suppressIncidentsbooleanNoSuppress incident creation (default: true)
autoPublishToStatusPagebooleanNoAuto-publish to status page (default: false)
timezonestringNoTimezone for start/end times (default: UTC)
recurringCronstringNoCron expression for recurring windows (null = one-time)

Example

curl -X POST https://api.ionhour.com/api/maintenance-windows \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{
    "workspaceId": 1,
    "name": "Database migration - March 2025",
    "description": "Upgrading PostgreSQL from 15 to 16",
    "startAt": "2025-03-15T02:00:00Z",
    "endAt": "2025-03-15T04:00:00Z",
    "projectIds": [1, 3],
    "suppressAlerts": true,
    "suppressIncidents": true,
    "autoPublishToStatusPage": true
  }'

List Maintenance Windows

GET /maintenance-windows

Query Parameters

ParameterTypeRequiredDescription
workspaceIdnumberYesFilter by workspace
statestringNoFilter by state: SCHEDULED, ACTIVE, COMPLETED, CANCELLED
curl -H "Authorization: Bearer ionh_your_key" \
  "https://api.ionhour.com/api/maintenance-windows?workspaceId=1&state=SCHEDULED"

Get Maintenance Window

GET /maintenance-windows/:id

Returns a window with its target projects.

curl -H "Authorization: Bearer ionh_your_key" \
  https://api.ionhour.com/api/maintenance-windows/1

Update Maintenance Window

PUT /maintenance-windows/:id

Updates a maintenance window. Only SCHEDULED windows can be modified — ACTIVE, COMPLETED, and CANCELLED windows are immutable.

curl -X PUT https://api.ionhour.com/api/maintenance-windows/1 \
  -H "Authorization: Bearer ionh_your_key" \
  -H "Content-Type: application/json" \
  -d '{"endAt": "2025-03-15T06:00:00Z"}'

Cancel Maintenance Window

POST /maintenance-windows/:id/cancel

Cancels a scheduled or active maintenance window. Suppression stops immediately.

curl -X POST https://api.ionhour.com/api/maintenance-windows/1/cancel \
  -H "Authorization: Bearer ionh_your_key"

Delete Maintenance Window

DELETE /maintenance-windows/:id
curl -X DELETE https://api.ionhour.com/api/maintenance-windows/1 \
  -H "Authorization: Bearer ionh_your_key"

Window States

StateDescription
SCHEDULEDCreated but not yet active. Can be modified or cancelled.
ACTIVECurrently in effect. Suppression is active for targeted projects.
COMPLETEDEnd time has passed. Suppression no longer active.
CANCELLEDManually cancelled. Suppression stopped immediately.