v1
latestOpenAPI 3.0.02026-07-141,4077,1665.2 MBFleet Automation
Update a schedule
Partially update a schedule by providing only the fields you want to change.
This endpoint allows you to modify specific attributes of a schedule without affecting other fields. Common use cases include:
- Changing the schedule status between active and inactive
- Updating the maintenance window times
- Modifying the filter query to target different hosts
- Adjusting the version strategy
Only include the fields you want to update in the request body. All fields are optional in a PATCH request.
patch/api/unstable/fleet/schedules/{id}
Path parameters
idstring required
The unique identifier of the schedule to update.
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
OK
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"
}
}