Spaces method and path for this operation:
patch /s/{space_id}/api/maintenance_window/{id}
Refer to Spaces for more information.
[Required authorization] Route required privileges: write-maintenance-window.
Body
-
Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.
-
Additional properties are NOT allowed.
-
Additional properties are NOT allowed.
-
The name of the maintenance window. While this name does not have to be unique, a distinctive name can help you identify a specific maintenance window.
PATCH
/api/maintenance_window/{id}
curl \
--request PATCH 'https://<KIBANA_URL>/api/maintenance_window/{id}' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"enabled":true,"schedule":{"custom":{"duration":"1h","recurring":{"end":"2025-12-31T00:00:00.000Z","every":"2w","onWeekDay":["FR"]},"start":"2025-04-01T10:00:00.000Z","timezone":"US/Eastern"}},"scope":{"alerting":{"query":{"kql":"kibana.alert.tags: \"database\""}}},"title":"Updated maintenance window"}'
Request example
Update a maintenance window to change its title, schedule, and scope.
{
"enabled": true,
"schedule": {
"custom": {
"duration": "1h",
"recurring": {
"end": "2025-12-31T00:00:00.000Z",
"every": "2w",
"onWeekDay": [
"FR"
]
},
"start": "2025-04-01T10:00:00.000Z",
"timezone": "US/Eastern"
}
},
"scope": {
"alerting": {
"query": {
"kql": "kibana.alert.tags: \"database\""
}
}
},
"title": "Updated maintenance window"
}
Response examples (200)
The response returned when a maintenance window is successfully updated.
{
"created_at": "2025-02-25T10:00:00.000Z",
"created_by": "elastic",
"enabled": true,
"id": "f0cb1780-537a-4e34-8adf-3b4336862858",
"schedule": {
"custom": {
"duration": "1h",
"recurring": {
"end": "2025-12-31T00:00:00.000Z",
"every": "2w",
"onWeekDay": [
"FR"
]
},
"start": "2025-04-01T10:00:00.000Z",
"timezone": "US/Eastern"
}
},
"scope": {
"alerting": {
"query": {
"kql": "kibana.alert.tags: \"database\""
}
}
},
"status": "upcoming",
"title": "Updated maintenance window",
"updated_at": "2025-03-15T14:30:00.000Z",
"updated_by": "elastic"
}