---
title: "List maintenance windows"
method: GET
path: "/maintenance-windows"
tags: ["Maintenance windows"]
---

# List maintenance windows

`GET /maintenance-windows`

## Request

- Base URL: `https://api.spectate.net/v1`
- URL: `https://api.spectate.net/v1/maintenance-windows`
- Auth: HTTP bearer

Returns the team's windows, newest first.

## Query parameters

- `page` integer
- `per_page` integer

## Response `200`

Paginated set of `MaintenanceWindow`

- object
  - `current_page` integer, required
  - `data` MaintenanceWindow[], required
    - `id` string, uuid, required: Window ID
    - `name` string, required: Name
    - `reason` string, nullable, required: Why, for the team; `null` for none
    - `starts_at` string, date-time, nullable, required: A one-off window's start; `null` for a weekly window
    - `ends_at` string, date-time, nullable, required: A one-off window's end; `null` for a weekly window
    - `schedule` MaintenanceWindowSchedule, required: When a weekly window runs. An end time before the start time runs past midnight.
      - `timezone` string, required: Time zone of the times. The window follows the clock in this zone across daylight saving
      - `days` integer[], required: Days it starts on: 1 is Monday, 7 is Sunday
      - `start_time` string, required: Start time, `HH:MM`
      - `end_time` string, required: End time, `HH:MM`
    - `repeat_until` string, date, nullable, required: A weekly window's last date, in its time zone; `null` for no last date
    - `covers_everything` boolean, required: `true`: covers everything in the team, and `targets` is ignored
    - `exclude_from_uptime` boolean, required: `true`: failed checks during the window don't count as downtime
    - `active` boolean, required: `true` while it runs
    - `paused_at` string, date-time, nullable, required: When it was paused; `null` if it isn't. A paused window covers nothing
    - `next_start_at` string, date-time, nullable, required: When the current or next occurrence starts; `null` when none is to come
    - `current_end_at` string, date-time, nullable, required: When the running occurrence ends; `null` when it isn't running
    - `targets` MaintenanceWindowTarget[], required: What it covers
      - `type` 'monitor' | 'host' | 'domain' | 'alert_source' | 'project', required: What a maintenance window can cover.
      - `id` string, uuid, required: Its ID
      - `name` string, required: Its name
    - `created_at` string, date-time, required: When it was created
  - `first_page_url` string, nullable, required
  - `from` integer, nullable, required
  - `last_page_url` string, nullable, required
  - `last_page` integer, required
  - `links` object[], required: Generated paginator links.
    - `url` string, nullable, required
    - `label` string, required
    - `active` boolean, required
  - `next_page_url` string, nullable, required
  - `path` string, nullable, required: Base path for paginator generated URLs.
  - `per_page` integer, required: Number of items shown per page.
  - `prev_page_url` string, nullable, required
  - `to` integer, nullable, required: Number of the last item in the slice.
  - `total` integer, required: Total number of items being paginated.

## Other responses

- `401`: `UNAUTHENTICATED`: no token was sent. `INVALID_TOKEN`: the token is unknown or revoked. `TOKEN_EXPIRED`: the token has expired.
- `403`: `FORBIDDEN`: the token lacks an ability this endpoint requires (listed in `details.required_abilities`). `TEAM_PENDING_DELETION`: the team is scheduled for deletion. `TEAM_SUSPENDED`: Spectate suspended the team.
- `429`: `RATE_LIMITED`: too many requests for this token. Wait for the number of seconds in `Retry-After`.

---

[API](https://skmtc.dev/spectate/apis/spectate-api.md) - [All operations](https://skmtc.dev/spectate/apis/spectate-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spectate/apis/spectate-api/revisions/9b1a233997de?raw)
