Restart cluster

Restarts an Elasticsearch cluster. If a cluster is active: this command re-applies the existing plan but applies a "cluster_reboot", which issues an Elasticsearch restart command and waits for it to complete. If a cluster is inactive: this command starts it up with the most recent successful plan.


POST /api/v1/clusters/elasticsearch/{cluster_id}/_restart

Path Parameters

cluster_id (required)
(string) Identifier for the Elasticsearch cluster

Query Parameters

(boolean; default: false) If true, will cancel any pending plans before restarting (else will error)
(string; default: "__all_\_") Indicates the property or properties used to divide the list of instances to restart in groups. Valid options are: '__all__' (restart all at once), '__zone__' by logical zone, '__name__' one instance at the time, or a comma-separated list of attributes of the instances
(boolean; default: true) If restoring from shutdown and true (the default), then will restore the cluster from the last snapshot (if available)
(boolean; default: true) If true, will take a snapshot of the cluster before restarting (if possible)


(ClusterCommandResponse) The stop command was issued successfully, use the "GET" command on the /{cluster_id} resource to monitor progress
(BasicFailedReply) The cluster specified by {cluster_id} cannot be found (code: 'clusters.cluster_not_found')
(BasicFailedReply) The command sent to a cluster found the cluster in an illegal state, the error message gives more details (code: 'clusters.cluster_plan_state_error')
(BasicFailedReply) When running as an administrator (other than root), sudo is required (code: 'root.needs_sudo')