Adds a node to be shut down Added in 7.13.0

PUT /_nodes/{node_id}/shutdown

Designed for indirect use by ECE/ESS and ECK. Direct use is not supported.

Path parameters

  • node_id string Required

    The node id of node to be shut down

Query parameters

  • Period to wait for a connection to the master node. If no response is received before the timeout expires, the request fails and returns an error.

    Values are nanos, micros, ms, s, m, h, or d.

  • timeout string

    Period to wait for a response. If no response is received before the timeout expires, the request fails and returns an error.

    Values are nanos, micros, ms, s, m, h, or d.

application/json

Body Required

  • type string Required

    Values are restart, remove, or replace.

  • reason string Required

    A human-readable reason that the node is being shut down. This field provides information for other cluster operators; it does not affect the shut down process.

  • Only valid if type is restart. Controls how long Elasticsearch will wait for the node to restart and join the cluster before reassigning its shards to other nodes. This works the same as delaying allocation with the index.unassigned.node_left.delayed_timeout setting. If you specify both a restart allocation delay and an index-level allocation delay, the longer of the two is used.

  • Only valid if type is replace. Specifies the name of the node that is replacing the node being shut down. Shards from the shut down node are only allowed to be allocated to the target node, and no other data will be allocated to the target node. During relocation of data certain allocation rules are ignored, such as disk watermarks or user attribute filtering rules.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • acknowledged boolean Required

      For a successful response, this value is always true. On failure, an exception is returned instead.

PUT /_nodes/{node_id}/shutdown
curl \
 -X PUT http://api.example.com/_nodes/{node_id}/shutdown \
 -H "Content-Type: application/json" \
 -d '{"type":"restart","reason":"string","allocation_delay":"string","target_node_name":"string"}'
Request examples
{
  "type": "restart",
  "reason": "string",
  "allocation_delay": "string",
  "target_node_name": "string"
}
Response examples (200)
{
  "acknowledged": true
}