Get index templates Generally available; Added in 7.9.0

GET /_index_template/{name}

Get information about one or more index templates. ##Required authorization

  • Cluster privileges: manage_index_templates

Path parameters

  • name string Required

    Comma-separated list of index template names used to limit the request. Wildcard (*) expressions are supported.

Query parameters

  • local boolean

    If true, the request retrieves information from the local node only. Defaults to false, which means information is retrieved from the master node.

  • flat_settings boolean

    If true, returns settings in flat format.

  • 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.

  • include_defaults boolean

    If true, returns all relevant default configurations for the index template.

Responses

  • 200 application/json
    Hide response attribute Show response attribute object
    • index_templates array[object] Required
      Hide index_templates attributes Show index_templates attributes object
      • name string Required
      • index_template object Required
        Hide index_template attributes Show index_template attributes object
        • index_patterns string | array[string] Required
        • composed_of array[string] Required

          An ordered list of component template names. Component templates are merged in the order specified, meaning that the last component template specified has the highest precedence.

        • template object
          Hide template attributes Show template attributes object
          • aliases object

            Aliases to add. If the index template includes a data_stream object, these are data stream aliases. Otherwise, these are index aliases. Data stream aliases ignore the index_routing, routing, and search_routing options.

            Hide aliases attribute Show aliases attribute object
            • * object Additional properties
          • mappings object
            Hide mappings attributes Show mappings attributes object
            • all_field object
            • date_detection boolean
            • dynamic string

              Values are strict, runtime, true, or false.

            • dynamic_date_formats array[string]
            • dynamic_templates array[object]
            • _field_names object
            • index_field object
            • _meta object
            • numeric_detection boolean
            • properties object
            • _routing object
            • _size object
            • _source object
            • runtime object
            • enabled boolean
            • subobjects string

              Values are true or false.

            • _data_stream_timestamp object
          • settings object
            Hide settings attributes Show settings attributes object
            • index object
            • mode string
            • routing_path
            • soft_deletes object
            • sort object
            • number_of_shards
            • number_of_replicas
            • number_of_routing_shards number
            • check_on_startup string

              Values are true, false, or checksum.

            • codec string
            • routing_partition_size
            • load_fixed_bitset_filters_eagerly boolean
            • hidden
            • auto_expand_replicas
            • merge object
            • refresh_interval string

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • max_result_window number
            • max_inner_result_window number
            • max_rescore_window number
            • max_script_fields number
            • max_ngram_diff number
            • max_shingle_diff number
            • blocks object
            • max_refresh_listeners number
            • analyze object
            • highlight object
            • max_terms_count number
            • max_regex_length number
            • routing object
            • gc_deletes string

              A duration. Units can be nanos, micros, ms (milliseconds), s (seconds), m (minutes), h (hours) and d (days). Also accepts "0" without a unit and "-1" to indicate an unspecified value.

            • default_pipeline string
            • final_pipeline string
            • lifecycle object
            • provided_name string
            • creation_date
            • creation_date_string
            • uuid string
            • version object
            • verified_before_close
            • format
            • max_slices_per_scroll number
            • translog object
            • query_string object
            • priority
            • top_metrics_max_size number
            • analysis object
            • settings object
            • time_series object
            • queries object
            • similarity object

              Configure custom similarity settings to customize how search results are scored.

            • mapping object
            • indexing.slowlog object
            • indexing_pressure object
            • store object
          • lifecycle object
          • data_stream_options object | string | null

        • version number
        • priority number

          Priority to determine index template precedence when a new data stream or index is created. The index template with the highest priority is chosen. If no priority is specified the template is treated as though it is of priority 0 (lowest priority). This number is not automatically generated by Elasticsearch.

        • _meta object
          Hide _meta attribute Show _meta attribute object
          • * object Additional properties
        • allow_auto_create boolean
        • data_stream object
          Hide data_stream attributes Show data_stream attributes object
          • hidden boolean

            If true, the data stream is hidden.

          • allow_custom_routing boolean

            If true, the data stream supports custom routing.

        • deprecated boolean Generally available; Added in 8.12.0

          Marks this index template as deprecated. When creating or updating a non-deprecated index template that uses deprecated components, Elasticsearch will emit a deprecation warning.

        • ignore_missing_component_templates string | array[string]
GET /_index_template/{name}
GET _index_template/*?filter_path=index_templates.name,index_templates.index_template.index_patterns,index_templates.index_template.data_stream
curl \
 --request GET 'http://api.example.com/_index_template/{name}'

Documentation preview

This is a preview of your version @2025-06-09 which is not yet released.