GET /_alias

Retrieves information for one or more data stream or index aliases.

Required authorization

  • Index privileges: view_index_metadata

Query parameters

  • allow_no_indices boolean

    A setting that does two separate checks on the index expression. If false, the request returns an error (1) if any wildcard expression (including _all and *) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. If true, index expressions that resolve to no indices are allowed and the request returns an empty result.

  • expand_wildcards string | array[string]

    Type of index that wildcard patterns can match. If the request can target data streams, this argument determines whether wildcard expressions match hidden data streams. Supports comma-separated values, such as open,hidden.

    Values are all, open, closed, hidden, or none.

  • ignore_unavailable boolean

    If false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. If true, unavailable concrete targets are silently ignored.

  • master_timeout string

    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 -1 or 0.

    External documentation

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • * object Additional properties
      Hide * attribute Show * attribute object
      • aliases object Required
        Hide aliases attribute Show aliases attribute object
        • * object Additional properties
          Hide * attributes Show * attributes object
          • filter object

            Query used to limit documents the alias can access.

            External documentation
            Hide filter attributes Show filter attributes object
            • common object Deprecated
            • fuzzy object

              Returns documents that contain terms similar to the search term, as measured by a Levenshtein edit distance.

            • geo_grid object

              Matches geo_point and geo_shape values that intersect a grid cell from a GeoGrid aggregation.

            • intervals object

              Returns documents based on the order and proximity of matching terms.

            • match object

              Returns documents that match a provided text, number, date or boolean value. The provided text is analyzed before matching.

            • match_bool_prefix object

              Analyzes its input and constructs a bool query from the terms. Each term except the last is used in a term query. The last term is used in a prefix query.

            • match_phrase object

              Analyzes the text and creates a phrase query out of the analyzed text.

            • match_phrase_prefix object

              Returns documents that contain the words of a provided text, in the same order as provided. The last term of the provided text is treated as a prefix, matching any words that begin with that term.

            • prefix object

              Returns documents that contain a specific prefix in a provided field.

            • range object

              Returns documents that contain terms within a provided range.

            • regexp object

              Returns documents that contain terms matching a regular expression.

            • span_term object

              Matches spans containing a term.

            • term object

              Returns documents that contain an exact term in a provided field. To return a document, the query term must exactly match the queried field's value, including whitespace and capitalization.

            • terms_set object

              Returns documents that contain a minimum number of exact terms in a provided field. To return a document, a required number of terms must exactly match the field values, including whitespace and capitalization.

            • text_expansion object Deprecated Generally available; Added in 8.8.0

              Uses a natural language processing model to convert the query text into a list of token-weight pairs which are then used in a query against a sparse vector or rank features field.

            • weighted_tokens object Deprecated Generally available; Added in 8.13.0

              Supports returning text_expansion query results by sending in precomputed tokens with the query.

            • wildcard object

              Returns documents that contain terms matching a wildcard pattern.

          • index_routing string

            Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.

          • is_write_index boolean

            If true, the index is the write index for the alias.

            Default value is false.

          • routing string

            Value used to route indexing and search operations to a specific shard.

          • search_routing string

            Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.

          • is_hidden boolean Generally available; Added in 7.16.0

            If true, the alias is hidden. All indices for the alias must have the same is_hidden value.

            Default value is false.

GET /_alias
curl \
 --request GET 'http://api.example.com/_alias'