younifyd
Menu

Create or update an alias (POST /_aliases)

Create or update an alias

POST/_aliases

Use it in a workflow

  1. Add a step and choose the Elasticsearch connector.
  2. Pick the Create or update an alias (POST /_aliases) action (under indices).
  3. Fill in the fields below, then reference the result from later steps as {{createOrUpdateAnAliasPostAliases.response.data}}.

Request

Query parameters

master_timeoutoneOf

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.

timeoutoneOf

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

Request body

Enter the body as JSON in the step's Body field.

actionsarray<object>

Actions to perform.

addany

Adds a data stream or index to an alias. If the alias doesn’t exist, the `add` action creates it.

removeany

Removes a data stream or index from an alias.

remove_indexany

Deletes an index. You cannot use this action on aliases or data streams.

json
{
  "actions": [
    {
      "add": null,
      "remove": null,
      "remove_index": null
    }
  ]
}

Response

Returns 200 with an object. Read it in later steps with {{createOrUpdateAnAliasPostAliases.response.data.<field>}}.

acknowledgedboolean

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

json
{
  "acknowledged": false
}

Need more? See the Elasticsearch guide for connection setup and behaviour shared by every action.

Create or update an alias (POST /_aliases) — Elasticsearch — Documentation