POST/v1/status_pages/{status_page_id}/scheduled_maintenance

Schedule maintenance for a status page

Requires STATUS_PAGES:EDIT; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Header parameters

X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.

Path parameters

status_page_id:string
Status Page ID

Body parameters

title:string
Title of the scheduled maintenance
description:string
Description of the scheduled maintenance
start_date:string(date-time)
When the scheduled maintenance is expected to start (ISO 8601)
duration_minutes:integer
How long (in minutes) the maintenance is expected to last
components_affected:string[]optional
Component IDs affected by this maintenance
notifications:objectoptional
Notification settings for subscribers

Responses

StatusMeaningDescription
201CreatedReturns the newly created scheduled maintenance
400Bad RequestBad Request - validation error
401UnauthorizedMissing or invalid credentials
403ForbiddenInsufficient permissions
404Not FoundResource not found, unavailable, or rejected by the domain operation
500Internal Server ErrorInternal Server Error

Response Schema

result:any
*anonymous*:objectoptional
*anonymous*:objectoptional
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

POST
/v1/status_pages/{status_page_id}/scheduled_maintenance
curl --request POST \
  --url https://api.onlineornot.com/v1/status_pages/a1b2c3d4/scheduled_maintenance \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --header 'X-OnlineOrNot-Organisation: string' \
  --data '{"title":"Database upgrade","description":"Upgrading to PostgreSQL 16","start_date":"2024-03-01T02:00:00.000Z","duration_minutes":60,"components_affected":["comp_abc123","comp_def456"],"notifications":{"an_hour_before":false,"at_start":true,"at_end":true}}'

Response

{
  "result": {
    "id": "a1b2c3d4",
    "title": "API is inaccessible",
    "impact": "MAJOR_OUTAGE",
    "started": "2021-01-01T00:00:00.000Z",
    "ended": "2021-02-01T00:00:00.000Z",
    "created_at": "2021-01-01T00:00:00.000Z",
    "updated_at": "2021-02-01T00:00:00.000Z",
    "start_date": "2021-01-01T00:00:00.000Z",
    "duration_minutes": 60,
    "notifications": {
      "an_hour_before": false,
      "at_start": true,
      "at_end": true
    },
    "components": [
      {
        "id": "comp123",
        "name": "API Server"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/status_pages/{status_page_id}/scheduled_maintenance/{scheduled_maintenance_id}

Retrieve a scheduled maintenance

Requires STATUS_PAGES:READ; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Header parameters

X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.

Path parameters

status_page_id:string
Status Page ID
scheduled_maintenance_id:string
Scheduled Maintenance ID

Responses

StatusMeaningDescription
200OKReturns the scheduled maintenance
400Bad RequestInvalid request
401UnauthorizedMissing or invalid credentials
403ForbiddenInsufficient permissions
404Not FoundNot found
500Internal Server ErrorInternal Server Error

Response Schema

result:any
*anonymous*:objectoptional
*anonymous*:objectoptional
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

GET
/v1/status_pages/{status_page_id}/scheduled_maintenance/{scheduled_maintenance_id}
curl --request GET \
  --url https://api.onlineornot.com/v1/status_pages/a1b2c3d4/scheduled_maintenance/sm1b2c3d4 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'X-OnlineOrNot-Organisation: string'

Response

{
  "result": {
    "id": "a1b2c3d4",
    "title": "API is inaccessible",
    "impact": "MAJOR_OUTAGE",
    "started": "2021-01-01T00:00:00.000Z",
    "ended": "2021-02-01T00:00:00.000Z",
    "created_at": "2021-01-01T00:00:00.000Z",
    "updated_at": "2021-02-01T00:00:00.000Z",
    "start_date": "2021-01-01T00:00:00.000Z",
    "duration_minutes": 60,
    "notifications": {
      "an_hour_before": false,
      "at_start": true,
      "at_end": true
    },
    "components": [
      {
        "id": "comp123",
        "name": "API Server"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

PATCH/v1/status_pages/{status_page_id}/scheduled_maintenance/{scheduled_maintenance_id}

Update a scheduled maintenance (only before it has started)

Requires STATUS_PAGES:EDIT; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Header parameters

X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.

Path parameters

status_page_id:string
Status Page ID
scheduled_maintenance_id:string
Scheduled Maintenance ID

Body parameters

title:stringoptional
Updated title
start_date:string(date-time)optional
Updated start date (ISO 8601)
duration_minutes:integeroptional
Updated duration in minutes

Responses

StatusMeaningDescription
200OKReturns the updated scheduled maintenance
400Bad RequestBad Request - cannot update after maintenance has started
401UnauthorizedMissing or invalid credentials
403ForbiddenInsufficient permissions
404Not FoundNot found
500Internal Server ErrorInternal Server Error

Response Schema

result:any
*anonymous*:objectoptional
*anonymous*:objectoptional
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

PATCH
/v1/status_pages/{status_page_id}/scheduled_maintenance/{scheduled_maintenance_id}
curl --request PATCH \
  --url https://api.onlineornot.com/v1/status_pages/a1b2c3d4/scheduled_maintenance/sm1b2c3d4 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --header 'X-OnlineOrNot-Organisation: string' \
  --data '{"title":"Database upgrade v2","start_date":"2024-03-02T02:00:00.000Z","duration_minutes":120}'

Response

{
  "result": {
    "id": "a1b2c3d4",
    "title": "API is inaccessible",
    "impact": "MAJOR_OUTAGE",
    "started": "2021-01-01T00:00:00.000Z",
    "ended": "2021-02-01T00:00:00.000Z",
    "created_at": "2021-01-01T00:00:00.000Z",
    "updated_at": "2021-02-01T00:00:00.000Z",
    "start_date": "2021-01-01T00:00:00.000Z",
    "duration_minutes": 60,
    "notifications": {
      "an_hour_before": false,
      "at_start": true,
      "at_end": true
    },
    "components": [
      {
        "id": "comp123",
        "name": "API Server"
      }
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

DELETE/v1/status_pages/{status_page_id}/scheduled_maintenance/{scheduled_maintenance_id}

Delete a scheduled maintenance

Requires STATUS_PAGES:EDIT; EDIT also grants READ. Session cookies are accepted only when no bearer credential is supplied.

Security: Bearer Auth

Provide your bearer token in the Authorization header when making requests to protected resources.

Example: Authorization: Bearer 123

Header parameters

X-OnlineOrNot-Organisation:stringoptional
Public organization ID to select from an OAuth grant. Required for grants authorizing multiple organizations. Omit for single-organization grants and API tokens.

Path parameters

status_page_id:string
Status Page ID
scheduled_maintenance_id:string
Scheduled Maintenance ID

Responses

StatusMeaningDescription
200OKReturns the deleted scheduled maintenance's ID
400Bad RequestInvalid request
401UnauthorizedMissing or invalid credentials
403ForbiddenInsufficient permissions
404Not FoundNot found
500Internal Server ErrorInternal Server Error

Response Schema

result:object
success:boolean
Whether the API call was successful
errors:object[]
messages:object[]

Request

DELETE
/v1/status_pages/{status_page_id}/scheduled_maintenance/{scheduled_maintenance_id}
curl --request DELETE \
  --url https://api.onlineornot.com/v1/status_pages/a1b2c3d4/scheduled_maintenance/sm1b2c3d4 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'X-OnlineOrNot-Organisation: string'

Response

{
  "result": {
    "id": "sm1b2c3d4"
  },
  "success": true,
  "errors": [],
  "messages": []
}

Was this page helpful?