Get index template information
- GET /_cat/templates/{name}
- GET /_cat/templates
Get information about the index templates in a cluster. You can use index templates to apply index settings and field mappings to new indices at creation. IMPORTANT: cat APIs are only intended for human consumption using the command line or Kibana console. They are not intended for use by applications. For application consumption, use the get index template API.
- Cluster privileges:
monitor
Path Parameters
-
namestring Nameoptional -
The name of the template to return. Accepts wildcard expressions. If omitted, all templates are returned.
Leave it out to use
/_cat/templates.
Query Parameters
-
hNames List of columns to appear in the response. Supports simple wildcards.
-
sNames List of columns that determine how the table should be sorted. Sorting defaults to ascending and can be changed by setting
:ascor:descas a suffix to the column name.-
localboolean · default: false If
true, the request computes the list of selected nodes from the local cluster state. Iffalsethe list of selected nodes are computed from the cluster state of the master node. In both cases the coordinating node will send requests for further information to each selected node.-
master_timeoutstring Duration · default: 30s Period to wait for a connection to the master node.
Response
Response Type: TemplatesRecord
-
namestring Name -
The template name.
-
index_patternsstring -
The template index patterns.
-
orderstring -
The template application order or priority number.
-
versionVersionString | stringnullable -
The template version.
-
composed_ofstring -
The component templates that comprise the index template.