Link Search Menu Expand Document Documentation Menu

You're viewing version 3.3 of the OpenSearch documentation. This version is no longer maintained. For the latest version, see the current documentation. For information about OpenSearch version maintenance, see Release Schedule and Maintenance Policy.

CAT Aliases API

Introduced 1.0

The CAT aliases operation lists the mapping of aliases to indexes, plus routing and filtering information.

Endpoints

GET /_cat/aliases
GET /_cat/aliases/{name}

Query parameters

The following table lists the available query parameters. All query parameters are optional.

Parameter Data type Description Default
expand_wildcards List or String Specifies the type of index that wildcard expressions can match. Supports comma-separated values.
Valid values are:
- all: Match any index, including hidden ones.
- closed: Match closed, non-hidden indexes.
- hidden: Match hidden indexes. Must be combined with open, closed, or both.
- none: Wildcard expressions are not accepted.
- open: Match open, non-hidden indexes.
N/A
format String A short version of the Accept header, such as json or yaml. N/A
h List A comma-separated list of column names to display. N/A
help Boolean Returns help information. false
local Boolean Whether to return information from the local node only instead of from the cluster manager node. false
s List A comma-separated list of column names or column aliases to sort by. N/A
v Boolean Enables verbose mode, which displays column headers. false

Example requests

GET /_cat/aliases?v
response = client.cat.aliases(
  params = { "v": "true" }
)

To limit the information to a specific alias, add the alias name after your query:

GET /_cat/aliases/<alias>?v
response = client.cat.aliases(
  name = "<alias>",
  params = { "v": "true" }
)

If you want to get information for more than one alias, separate the alias names with commas:

GET /_cat/aliases/alias1,alias2,alias3
response = client.cat.aliases(
  name = "alias1,alias2,alias3"
)

Example response

The following response shows different types of alias configurations:

alias            | index          | filter | routing.index | routing.search | is_write_index
current-logs     | app-logs-2024  | -      | -             | -              | -
filtered-data    | customer-data  | *      | -             | -              | -
regional-orders  | orders-2024    | -      | west          | west           | -
multi-route      | products       | -      | 1             | 1,2            | -

This response shows:

  • current-logs: A simple alias without filters or routing
  • filtered-data: An alias with a configured filter (indicated by *)
  • regional-orders: An alias with routing configured for both indexing and searching
  • multi-route: An alias with different routing for indexing (1) and searching (1,2)

To learn more about index aliases, see Index aliases. For alias management APIs, see Alias APIs.

350 characters left

Have a question? .

Want to contribute? or .