---
title: "Trigger a schedule deployment"
method: POST
path: "/api/unstable/fleet/schedules/{id}/trigger"
tags: ["Fleet Automation"]
---

# Trigger a schedule deployment

`POST /api/unstable/fleet/schedules/{id}/trigger`

Manually trigger a schedule to immediately create and start a deployment.

This endpoint allows you to manually initiate a deployment using the schedule's
configuration, without waiting for the next scheduled maintenance window. This is
useful for:
- Testing a schedule before it runs automatically
- Performing an emergency update outside the regular maintenance window
- Creating an ad-hoc deployment with the same settings as a schedule

The deployment is created immediately with:
- The same filter query as the schedule
- The package version determined by the schedule's version strategy
- All matching hosts as targets

The manually triggered deployment is independent of the schedule and does not
affect the schedule's normal recurrence pattern.

## Path parameters

- `id` string, required

## Response `201`

CREATED - Deployment successfully created and started.

- FleetDeploymentResponse — Response containing a single deployment.
  - `data` FleetDeployment — A deployment that defines automated configuration changes for a fleet of hosts.
    - `attributes` FleetDeploymentAttributes, required — Attributes of a deployment in the response.
      - `config_operations` FleetDeploymentOperation[] — Ordered list of configuration file operations to perform on the target hosts.
        - `file_op` 'merge-patch' | 'delete', required — Type of file operation to perform on the target configuration file. - `merge-patch`: Merges the provided patch data with the existing configuration file. Creates the file if it doesn't exist. - `delete`: Removes the specified configuration file from the target hosts.
        - `file_path` string, required — Absolute path to the target configuration file on the host.
        - `patch` object — Patch data in JSON format to apply to the configuration file. When using `merge-patch`, this object is merged with the existing configuration, allowing you to add, update, or override specific fields without replacing the entire file. The structure must match the target configuration file format (for example, YAML structure for Datadog Agent config). Not applicable when using the `delete` operation.
      - `estimated_end_time_unix` integer — Estimated completion time of the deployment as a Unix timestamp (seconds since epoch).
      - `filter_query` string — Query used to filter and select target hosts for the deployment. Uses the Datadog query syntax.
      - `high_level_status` string — Current high-level status of the deployment (for example, "pending", "running", "completed", "failed").
      - `hosts` FleetDeploymentHost[] — Paginated list of hosts in this deployment with their individual statuses. Only included when fetching a single deployment by ID. Use the `limit` and `page` query parameters to navigate through pages. Pagination metadata is included in the response `meta.hosts` field.
        - `error` string — Error message if the deployment failed on this host.
        - `hostname` string — The hostname of the agent.
        - `status` string — Current deployment status for this specific host.
        - `versions` FleetDeploymentHostPackage[] — List of packages and their versions currently installed on this host.
          - `current_version` string — The current version of the package on the host.
          - `initial_version` string — The initial version of the package on the host before the deployment started.
          - `package_name` string — The name of the package.
          - `target_version` string — The target version that the deployment is attempting to install.
      - `packages` FleetDeploymentPackage[] — List of packages to deploy to target hosts. Present only for package upgrade deployments.
        - `name` string, required — The name of the package to deploy.
        - `version` string, required — The target version of the package to deploy.
      - `total_hosts` integer — Total number of hosts targeted by this deployment.
    - `id` string, required — Unique identifier for the deployment.
    - `type` 'deployment', required — The type of deployment resource.
  - `meta` FleetDeploymentResponseMeta — Metadata for a single deployment response, including pagination information for hosts.
    - `hosts` FleetDeploymentHostsPage — Pagination details for the list of hosts in a deployment.
      - `current_page` integer — Current page index (zero-based).
      - `page_size` integer — Number of hosts returned per page.
      - `total_hosts` integer — Total number of hosts in this deployment.
      - `total_pages` integer — Total number of pages available.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
