Type to search.

Create a maintenance window.

Base URL
https://{kibana_url}
  • POST /api/maintenance_window
Auth The Elastic Stack includes Elastic's core products such as Elasticsearch, Kibana, Logstash, and Beats. Availability Generally available since 9.1 This functionality is generally available and ready for production usage. Unless stated otherwise on the page, this functionality is available when your Elastic Stack is deployed on Elastic Cloud Hosted, Elastic Cloud Enterprise, Elastic Cloud on Kubernetes, and self-managed environments. This documentation corresponds to the latest patch available for each minor version. If you're not using the latest patch, check the release notes for changes.

Required privileges

Privileges write-maintenance-window

Header parameters

kbn-xsrf string required

A required header to protect against CSRF attacks

Request body

enabled boolean

Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.

schedule object required
custom object required
duration string · max length: 100 required

The duration of the schedule. It allows values in <integer><unit> format. <unit> is one of d, h, m, or s for hours, minutes, seconds. For example: 1d, 5h, 30m, 5000s.

start string · max length: 100 required

The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: 2025-03-12T12:00:00.000Z.

timezone string · max length: 64

The timezone of the schedule. The default timezone is UTC.

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.

Responses

Indicates a successful call.

application/json
created_at string required

The date and time when the maintenance window was created.

created_by string · default: null nullable

The identifier for the user that created the maintenance window.

enabled boolean required

Whether the current maintenance window is enabled. Disabled maintenance windows do not suppress notifications.

id string required

The identifier for the maintenance window.

schedule object required
custom object required
duration string required

The duration of the schedule. It allows values in <integer><unit> format. <unit> is one of d, h, m, or s for hours, minutes, seconds. For example: 1d, 5h, 30m, 5000s.

start string required

The start date and time of the schedule, provided in ISO 8601 format and set to the UTC timezone. For example: 2025-03-12T12:00:00.000Z.

timezone string

The timezone of the schedule. The default timezone is UTC.

status enum required

The current status of the maintenance window.

Values: running upcoming finished archived disabled
title string required

The name of the maintenance window.

updated_at string required

The date and time when the maintenance window was last updated.

updated_by string · default: null nullable

The identifier for the user that last updated this maintenance window.

400

Indicates an invalid schema or parameters.

403

Indicates that this call is forbidden.