ATStatus
ATStatus WikiLoading documentation...

Maintenance API

Endpoints for managing scheduled maintenance.

List Maintenance

GET /api/v1/maintenance

Query Parameters

ParameterDescription
statusPageIdFilter by status page
statusFilter by status
upcomingOnly future maintenance

Response

{
  "data": [
    {
      "id": 1,
      "title": "Database Upgrade",
      "description": "Upgrading database to latest version",
      "status": "scheduled",
      "statusPageId": 1,
      "scheduledStartTime": "2024-01-20T02:00:00Z",
      "scheduledEndTime": "2024-01-20T04:00:00Z",
      "autoStart": true,
      "affectedComponents": [...]
    }
  ]
}

Get Maintenance

GET /api/v1/maintenance/:id

Create Maintenance

POST /api/v1/maintenance

Request Body

{
  "title": "Scheduled Maintenance",
  "description": "Description of the maintenance work",
  "statusPageId": 1,
  "scheduledStartTime": "2024-01-20T02:00:00Z",
  "scheduledEndTime": "2024-01-20T04:00:00Z",
  "autoStart": true,
  "componentIds": [1, 2]
}

Valid Statuses

  • scheduled
  • in_progress
  • completed
  • cancelled

Update Maintenance

PATCH /api/v1/maintenance/:id

Request Body

{
  "title": "Updated Title",
  "scheduledEndTime": "2024-01-20T05:00:00Z"
}

Start Maintenance

POST /api/v1/maintenance/:id/start

Manually starts the maintenance (changes status to in_progress).

Complete Maintenance

POST /api/v1/maintenance/:id/complete

Request Body

{
  "message": "Maintenance completed successfully."
}

Cancel Maintenance

POST /api/v1/maintenance/:id/cancel

Request Body

{
  "message": "Maintenance has been postponed."
}

Delete Maintenance

DELETE /api/v1/maintenance/:id