Update aliases and delete indices atomically

  • POST /_aliases
Auth

Applies one or more actions in a single request:

  • Add a data stream or index to an alias.
  • Remove a data stream or index from an alias.
  • Delete an index in that same request, so the deletion and the alias changes are applied together.

For example, you can replace an index with an alias of the same name.

Note

Every remove_index action in the request runs first, before any add or remove actions, no matter where it sits in the actions array.

Required privileges

Index privileges manage

Query parameters

master_timeout string · default: 30s

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.

timeout string · default: 30s

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

Request body

Response

application/json
acknowledged boolean required

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

errors boolean

If true, at least one alias action failed. The request still returns HTTP 200.