---
title: "Get a schedule by ID"
method: GET
path: "/api/unstable/fleet/schedules/{id}"
tags: ["Fleet Automation"]
---

# Get a schedule by ID

`GET /api/unstable/fleet/schedules/{id}`

## Request

- Base URL: `https://api.datadoghq.com`
- URL: `https://api.datadoghq.com/api/unstable/fleet/schedules/{id}`
- Auth: API key in header `DD-API-KEY` and API key in header `DD-APPLICATION-KEY`

Retrieve detailed information about a specific schedule using its unique identifier.

This endpoint returns comprehensive information about a schedule, including:
- Schedule metadata (ID, name, creation/update timestamps)
- Filter query for selecting target hosts
- Recurrence rule defining when deployments are triggered
- Version strategy for package upgrades
- Current status (active or inactive)

## Path parameters

- `id` string, required

## Response `200`

OK

- FleetScheduleResponse: Response containing a single schedule.
  - `data` FleetSchedule: A schedule that automatically creates deployments based on a recurrence rule.
    - `attributes` FleetScheduleAttributes, required: Attributes of a schedule in the response.
      - `created_at_unix` integer: Unix timestamp (seconds since epoch) when the schedule was created.
      - `created_by` string: User handle of the person who created the schedule.
      - `name` string: Human-readable name for the schedule.
      - `query` string: Query used to filter and select target hosts for scheduled deployments. Uses the Datadog query syntax.
      - `rule` FleetScheduleRecurrenceRule: Defines the recurrence pattern for the schedule. Specifies when deployments should be automatically triggered based on maintenance windows.
        - `days_of_week` string[], required: List of days of the week when the schedule should trigger. Valid values are: "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sun".
        - `maintenance_window_duration` integer, required: Duration of the maintenance window in minutes.
        - `start_maintenance_window` string, required: Start time of the maintenance window in 24-hour clock format (HH:MM). Deployments will be triggered at this time on the specified days.
        - `timezone` string, required: Timezone for the schedule in IANA Time Zone Database format (e.g., "America/New_York", "UTC").
      - `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_unix` integer: Unix timestamp (seconds since epoch) 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 Maximum value is 2.
    - `id` string, required: Unique identifier for the schedule.
    - `type` 'schedule', required: The type of schedule resource.

## Other responses

- `400`: Bad Request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Not Found
- `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/da68bf029e4c?raw)
