---
title: "List all schedules"
method: GET
path: "/api/v2/fleet/schedules"
tags: ["Fleet Automation"]
---

# List all schedules

`GET /api/v2/fleet/schedules`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/v2/fleet/schedules`
- Auth: one of:
  - API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`
  - OAuth 2
    - Authorization code: `/oauth2/v1/authorize`
    - Token URL: `/oauth2/v1/token`
- TypeScript: <https://skmtc.dev/datadog/apis/datadog-api-v2-collection/docs/api/v2/fleet/schedules/get.ts> (a function with typed inputs; its response is checked against the schema)

Retrieve all upgrade schedules for the organization.

Schedules automate package upgrades by defining maintenance windows and recurrence rules.
Each schedule automatically creates deployments based on its configuration.

## Response `200`

OK

- FleetSchedulesV2Response: Response containing a list of fleet schedules.
  - `data` FleetScheduleV2[], required: Array of schedules for the organization.
    - `attributes` FleetScheduleV2Attributes, required: Attributes of a fleet schedule in the v2 API response.
      - `created_at` string: RFC3339 timestamp when the schedule was created.
      - `created_by` string: User handle of the person who created the schedule.
      - `is_default` boolean: Whether this is the default schedule for the organization.
      - `name` string: Human-readable name for the schedule.
      - `next_run` string: RFC3339 timestamp of the next scheduled maintenance window start time. Absent when the next run time cannot be computed.
      - `notification_rule` FleetScheduleV2NotificationRule: Notification configuration attached to a schedule. Included when available. If the notification rule cannot be retrieved, this field is omitted and the schedule is still returned. If the notification rule is retrieved but its handles cannot be resolved, it is still included with an empty `handles` array.
        - `handles` string[]: Notification handles (for example, Slack channels or PagerDuty integrations).
        - `tags` string[]: Tags associated with the notification rule.
      - `query` string: Query used to filter and select target hosts for scheduled deployments.
      - `rule` FleetScheduleV2RecurrenceRule: Defines the recurrence pattern for the schedule.
        - `days_of_week` string[]: Days of the week when the schedule triggers. Valid values are "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun".
        - `interval` integer: Interval between schedule runs in weeks. 1 means the schedule runs every week on the specified days. Higher values repeat every N weeks.
        - `maintenance_window_duration` integer: Duration of the maintenance window in minutes.
        - `start_maintenance_window` string: Start time of the maintenance window in 24-hour clock format (HHMM). Deployments are triggered at this time on the specified days.
        - `timezone` string: Timezone in IANA Time Zone Database format.
      - `status` 'active' | 'inactive': The status of the schedule. - `active`: The schedule is active and will create deployments according to its recurrence rule. - `inactive`: The schedule is inactive and will not create any deployments.
      - `updated_at` string: RFC3339 timestamp when the schedule was last updated.
      - `updated_by` string: User handle of the person who last updated the schedule.
      - `version_to_latest` integer: Number of major versions behind the latest to target for upgrades. - 0: Always upgrade to the latest version. - 1: Upgrade to latest minus 1 major version. - 2: Upgrade to latest minus 2 major versions.
    - `id` string, required: Unique identifier for the schedule.
    - `type` 'schedule', required: The type of schedule resource.
  - `meta` FleetSchedulesV2ResponseMeta: Metadata for the v2 list of schedules response.
    - `page` FleetSchedulesV2Page: Pagination details for the v2 list of schedules.
      - `total_count` integer: Total number of schedules returned.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `429`: Too many requests

---

[API](https://skmtc.dev/datadog/apis/datadog-api-v2-collection.md) - [All operations](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/llms.txt) - [OpenAPI document](https://skmtc.dev/datadog/apis/datadog-api-v2-collection/revisions/3f70db624329?raw)
