GET/v1/maintenance-windows

List all maintenance windows

Retrieve maintenance windows across all projects, or filter by project_id. Use unassigned for windows without a project.

Requires MAINTENANCE_WINDOWS:READ.

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.

Query parameters

page:integeroptional
Page number of paginated results, starting at 1.
Default: 1
per_page:integeroptional
Number of items per page. Defaults to 20. Continue requesting subsequent pages until the accumulated item count reaches result_info.total_count or a page is empty.
Default: 20
search:stringoptional
Search term to filter maintenance windows by name
project_id:anyoptional
Project IDs, or unassigned for resources without a project. Repeat the parameter to include several, for example project_id=a1b2c3d4e5f6g7h8&project_id=unassigned. Omit to list all resources.

Responses

StatusMeaningDescription
200OKReturns a list of maintenance windows. May also return a canonical failure envelope with success: false at HTTP200.
400Bad RequestInvalid request
401UnauthorizedUnauthorized - Invalid or missing API token
403ForbiddenInsufficient permissions
404Not FoundProject not found
500Internal Server ErrorInternal Server Error

Response Schema

success:boolean
false
result:null
errors:object[]
messages:[any]

Request

GET
/v1/maintenance-windows
curl --request GET \
  --url https://api.onlineornot.com/v1/maintenance-windows \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": [
    {
      "project_id": "a1b2c3d4e5f6g7h8",
      "id": "abc123def456",
      "name": "Weekly Maintenance",
      "start_date": "2026-09-13T09:00:00.000Z",
      "duration_minutes": 60,
      "timezone": "America/New_York",
      "days_of_week": [
        "MONDAY",
        "WEDNESDAY",
        "FRIDAY"
      ],
      "status": "ENABLED"
    }
  ],
  "result_info": {
    "page": 1,
    "per_page": 20,
    "count": 1,
    "total_count": 1
  },
  "success": true,
  "errors": [],
  "messages": []
}

POST/v1/maintenance-windows

Create a new maintenance window

Create a maintenance window. Omitted or null project_id leaves it unassigned. Every selected check and heartbeat must belong to the same organisation and project.

Requires MAINTENANCE_WINDOWS:EDIT.

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.

Body parameters

project_id:string | nulloptional
Project ID. Omit or use null to leave the resource unassigned.
name:string
start_date:string
Start date and time of the maintenance window, as a timestamp
duration_minutes:integer
Duration of the maintenance window in minutes
timezone:string
Timezone for the maintenance window
days_of_week:enum[]
Days of the week when the maintenance window is active
Accepted values: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"
checks:string[]optional
Uptime check IDs to associate with this maintenance window
Default: []
heartbeats:string[]optional
Heartbeat IDs to associate with this maintenance window
Default: []

Responses

StatusMeaningDescription
201CreatedReturns the created maintenance window
400Bad RequestBad Request - Invalid input (e.g., invalid check/heartbeat IDs, empty name)
401UnauthorizedUnauthorized - Invalid or missing API token
403ForbiddenInsufficient permissions
404Not FoundProject or maintenance target not found
409ConflictMaintenance targets must belong to the same project as the window
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/maintenance-windows
curl --request POST \
  --url https://api.onlineornot.com/v1/maintenance-windows \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"name":"Weekly Server Maintenance","start_date":"2026-09-13T03:00:00.000Z","duration_minutes":60,"timezone":"America/New_York","days_of_week":["SUNDAY"]}'

Response

{
  "result": {
    "project_id": "a1b2c3d4e5f6g7h8",
    "id": "abc123def456",
    "name": "Weekly Maintenance",
    "start_date": "2026-09-13T09:00:00.000Z",
    "duration_minutes": 60,
    "timezone": "America/New_York",
    "days_of_week": [
      "MONDAY",
      "WEDNESDAY",
      "FRIDAY"
    ],
    "status": "ENABLED",
    "checks": [
      "abc123",
      "def456"
    ],
    "heartbeats": [
      "ghi789"
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

GET/v1/maintenance-windows/{maintenance_window_id}

Get a maintenance window by ID

Retrieve a maintenance window with associated checks and heartbeats

Requires MAINTENANCE_WINDOWS:READ.

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

maintenance_window_id:string
Maintenance Window ID

Responses

StatusMeaningDescription
200OKReturns a maintenance window with associated check and heartbeat IDs
400Bad RequestInvalid request
401UnauthorizedUnauthorized - Invalid or missing API token
403ForbiddenInsufficient permissions
404Not FoundNot Found - Maintenance window does not exist or belongs to different organization
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/maintenance-windows/{maintenance_window_id}
curl --request GET \
  --url https://api.onlineornot.com/v1/maintenance-windows/abc123def456 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

{
  "result": {
    "project_id": "a1b2c3d4e5f6g7h8",
    "id": "abc123def456",
    "name": "Weekly Maintenance",
    "start_date": "2026-09-13T09:00:00.000Z",
    "duration_minutes": 60,
    "timezone": "America/New_York",
    "days_of_week": [
      "MONDAY",
      "WEDNESDAY",
      "FRIDAY"
    ],
    "status": "ENABLED",
    "checks": [
      "abc123",
      "def456"
    ],
    "heartbeats": [
      "ghi789"
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

PATCH/v1/maintenance-windows/{maintenance_window_id}

Update a maintenance window

Update a maintenance window. All fields are optional - only provided fields will be updated. Updating checks or heartbeats replaces existing associations and requires the same project assignment. Assignment changes use the move operation.

Requires MAINTENANCE_WINDOWS:EDIT.

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

maintenance_window_id:string
Maintenance Window ID

Body parameters

project_id:stringoptional
*anonymous*:anyoptional
name:stringoptional
start_date:stringoptional
Start date and time of the maintenance window, as a timestamp
duration_minutes:integeroptional
Duration of the maintenance window in minutes
timezone:stringoptional
Timezone for the maintenance window
days_of_week:enum[]optional
Days of the week when the maintenance window is active
Accepted values: "SUNDAY" | "MONDAY" | "TUESDAY" | "WEDNESDAY" | "THURSDAY" | "FRIDAY" | "SATURDAY"
status:stringoptional
Accepted values: "ENABLED" | "DISABLED"
checks:string[]optional
Uptime check IDs. Replaces existing associations.
heartbeats:string[]optional
Heartbeat IDs. Replaces existing associations.

Responses

StatusMeaningDescription
200OKReturns the updated maintenance window
400Bad RequestBad Request - Invalid input (e.g., invalid check/heartbeat IDs, no fields to update)
401UnauthorizedUnauthorized - Invalid or missing API token
403ForbiddenInsufficient permissions
404Not FoundNot Found - Maintenance window does not exist or belongs to different organization
409ConflictMaintenance targets must belong to the same project as the window
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/maintenance-windows/{maintenance_window_id}
curl --request PATCH \
  --url https://api.onlineornot.com/v1/maintenance-windows/abc123def456 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"name":"Updated Maintenance Window"}'

Response

{
  "result": {
    "project_id": "a1b2c3d4e5f6g7h8",
    "id": "abc123def456",
    "name": "Weekly Maintenance",
    "start_date": "2026-09-13T09:00:00.000Z",
    "duration_minutes": 60,
    "timezone": "America/New_York",
    "days_of_week": [
      "MONDAY",
      "WEDNESDAY",
      "FRIDAY"
    ],
    "status": "ENABLED",
    "checks": [
      "abc123",
      "def456"
    ],
    "heartbeats": [
      "ghi789"
    ]
  },
  "success": true,
  "errors": [],
  "messages": []
}

DELETE/v1/maintenance-windows/{maintenance_window_id}

Delete a maintenance window

Delete a maintenance window and all its associations with checks and heartbeats

Requires MAINTENANCE_WINDOWS:EDIT.

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

maintenance_window_id:string
Maintenance Window ID

Responses

StatusMeaningDescription
200OKReturns the deleted maintenance window ID
400Bad RequestInvalid request
401UnauthorizedUnauthorized - Invalid or missing API token
403ForbiddenInsufficient permissions
404Not FoundNot Found - Maintenance window does not exist or belongs to different organization
500Internal Server ErrorInternal Server Error

Response Schema

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

Request

DELETE
/v1/maintenance-windows/{maintenance_window_id}
curl --request DELETE \
  --url https://api.onlineornot.com/v1/maintenance-windows/abc123def456 \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}'

Response

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

POST/v1/maintenance-windows/{maintenance_window_id}/move

Assign or unassign a maintenance window

The window and all its checks and heartbeats must retain the same assignment. Use the atomic resources move to select linked resources together.

Requires MAINTENANCE_WINDOWS:EDIT.

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

maintenance_window_id:string
Maintenance Window ID

Body parameters

project_id:string | null
Project ID, or null for unassigned.

Responses

StatusMeaningDescription
200OKMoved resource and destination
400Bad RequestInvalid request
401UnauthorizedMissing or invalid credentials
403ForbiddenInsufficient permissions
404Not FoundResource or project not found
409ConflictMove would break variable references, create a name conflict, or separate maintenance windows from their targets
500Internal Server ErrorInternal server error

Response Schema

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

Request

POST
/v1/maintenance-windows/{maintenance_window_id}/move
curl --request POST \
  --url https://api.onlineornot.com/v1/maintenance-windows/abc123def456/move \
  --header 'Accept: application/json' \
  --header 'Authorization: Bearer {access-token}' \
  --header 'Content-Type: application/json' \
  --data '{"project_id":"a1b2c3d4e5f6g7h8"}'

Response

{
  "result": {
    "id": "string",
    "project_id": "a1b2c3d4e5f6g7h8"
  },
  "success": true,
  "errors": [],
  "messages": []
}

Was this page helpful?