Create a maintenance window.
Generally available; added in 9.1.0
[Required authorization] Route required privileges: write-maintenance-window.
Body
-
enabled
boolean Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.
-
schedule
object Required Additional properties are NOT allowed.
-
scope
object Additional properties are NOT allowed.
-
title
string Required 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.
POST
/api/maintenance_window
curl \
--request POST 'https://localhost:5601/api/maintenance_window' \
--header "Authorization: $API_KEY" \
--header "Content-Type: application/json" \
--header "kbn-xsrf: true" \
--data '{"enabled":true,"schedule":{"custom":{"duration":"string","recurring":{"end":"string","every":"string","occurrences":42.0,"onMonth":[42.0],"onMonthDay":[42.0],"onWeekDay":["string"]},"start":"string","timezone":"string"}},"scope":{"alerting":{"query":{"kql":"string"}}},"title":"string"}'