For AI agents: A markdown version of this page is available at https://dnd37xeb23o8n.cloudfront.net/stefon.simmons/docs-astro-web-10435/ja/api/latest/fleet-automation/trigger-a-schedule-deployment.md. A documentation index is available at /llms.txt.
Language
Datadog site

Trigger a schedule deployment

警告This endpoint is in Preview and may introduce breaking changes. If you have any feedback, contact Datadog support.
POSThttps://api.datadoghq.com/api/unstable/fleet/schedules/{id}/triggerhttps://api.us3.datadoghq.com/api/unstable/fleet/schedules/{id}/triggerhttps://api.us5.datadoghq.com/api/unstable/fleet/schedules/{id}/triggerhttps://api.datadoghq.eu/api/unstable/fleet/schedules/{id}/triggerhttps://api.ap1.datadoghq.com/api/unstable/fleet/schedules/{id}/triggerhttps://api.ap2.datadoghq.com/api/unstable/fleet/schedules/{id}/triggerhttps://api.uk1.datadoghq.com/api/unstable/fleet/schedules/{id}/triggerhttps://api.ddog-gov.com/api/unstable/fleet/schedules/{id}/triggerhttps://api.us2.ddog-gov.com/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.

This endpoint requires the agent_upgrade_write permission.

引数

パスパラメーター

名前
タイプ
説明
id [required]
string

The unique identifier of the schedule to trigger.

応答

CREATED - Deployment successfully created and started.

Response containing a single deployment.

フィールド
タイプ
説明
data
object

A deployment that defines automated configuration changes for a fleet of hosts.

meta
object

Metadata for a single deployment response, including pagination information for hosts.

コード例

Trigger a schedule deployment
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"
# Path parameters
export id="abc-def-ghi-123"

# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"

curl -X POST "https://api.${DD_SITE}/api/unstable/fleet/schedules/${id}/trigger" \
-H "Accept: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}"