Get index templates

  • GET /_index_template/{name}
  • GET /_index_template
Auth

Get information about one or more index templates.

Required privileges

Cluster privileges manage_index_templates

Path parameters

name string optional

Name of index template to retrieve. Wildcard (*) expressions are supported.

Leave it out to use /_index_template.

Query parameters

local boolean · default: false deprecated

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 · default: false

If true, returns settings in flat format.

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.

include_defaults boolean · default: false

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

Response

application/json
index_templates object[] required
name string required
index_template object required
index_patterns union oneOf required

Array of wildcard (*) expressions used to match the names of data streams and indices during creation.

One of: string[] or string
composed_of 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.

version number

Version number used to manage index templates externally. This number is not automatically generated by Elasticsearch.

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

Optional user metadata about the index template. May have any contents. This map is not automatically generated by Elasticsearch.

allow_auto_create boolean
deprecated boolean

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 union oneOf

A list of component template names that are allowed to be absent.

One of: string[] or string
created_date union oneOf

Date and time when the index template was created. Only returned if the human query parameter is true.

One of: string or number
created_date_millis number

Date and time when the index template was created, in milliseconds since the epoch.

modified_date union oneOf

Date and time when the index template was last modified. Only returned if the human query parameter is true.

One of: string or number
modified_date_millis number

Date and time when the index template was last modified, in milliseconds since the epoch.