v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBFleet Automation
Create a schedule
Create a new schedule for automated package upgrades.
Schedules define when and how often to automatically deploy package upgrades to a fleet of hosts. Each schedule includes:
- A filter query to select target hosts
- A recurrence rule defining maintenance windows
- A version strategy (e.g., always latest, or N versions behind latest)
When the schedule triggers during a maintenance window, it automatically creates a deployment that upgrades the Datadog Agent to the specified version on all matching hosts.
post/api/unstable/fleet/schedules
Request body
Example request
{
"data": {
"attributes": {
"name": "Weekly Production Agent Updates",
"query": "env:prod AND service:web",
"rule": {
"days_of_week": [
"Mon",
"Wed",
"Fri"
],
"maintenance_window_duration": 1200,
"start_maintenance_window": "02:00",
"timezone": "America/New_York"
},
"status": "active"
},
"type": "schedule"
}
}Response
CREATED
Example response
{
"data": {
"attributes": {
"created_at_unix": 1699999999,
"created_by": "user@example.com",
"name": "Weekly Production Agent Updates",
"query": "env:prod AND service:web",
"rule": {
"days_of_week": [
"Mon",
"Wed",
"Fri"
],
"maintenance_window_duration": 1200,
"start_maintenance_window": "02:00",
"timezone": "America/New_York"
},
"status": "active",
"updated_at_unix": 1699999999,
"updated_by": "user@example.com"
},
"id": "abc-def-ghi-123",
"type": "schedule"
}
}