v1

latestOpenAPI 3.0.02026-07-141,4077,1665.2 MB
Fleet Automation

Trigger a schedule deployment

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.

post/api/unstable/fleet/schedules/{id}/trigger

Path parameters

idstring required

The unique identifier of the schedule to trigger.

Response

CREATED - Deployment successfully created and started.

Example response

{
  "data": {
    "attributes": {
      "config_operations": [
        {
          "file_op": "merge-patch",
          "file_path": "/datadog.yaml",
          "patch": {
            "apm_config": {
              "enabled": true
            },
            "log_level": "debug",
            "logs_enabled": true
          }
        }
      ],
      "estimated_end_time_unix": 1699999999,
      "filter_query": "env:prod AND service:web",
      "high_level_status": "pending",
      "hosts": [
        {
          "hostname": "web-server-01.example.com",
          "status": "succeeded",
          "versions": [
            {
              "current_version": "7.51.0",
              "initial_version": "7.51.0",
              "package_name": "datadog-agent",
              "target_version": "7.52.0"
            }
          ]
        }
      ],
      "packages": [
        {
          "name": "datadog-agent",
          "version": "7.52.0"
        }
      ],
      "total_hosts": 42
    },
    "id": "aeadc05e-98a8-11ec-ac2c-da7ad0900001",
    "type": "deployment"
  },
  "meta": {
    "hosts": {
      "page_size": 50,
      "total_hosts": 150,
      "total_pages": 3
    }
  }
}