2016-09-20 04:40:23 -04:00
|
|
|
[[cat-templates]]
|
|
|
|
== cat templates
|
|
|
|
|
|
|
|
The `templates` command provides information about existing templates.
|
|
|
|
|
|
|
|
[source, sh]
|
|
|
|
--------------------------------------------------
|
|
|
|
% curl 'localhost:9200/_cat/templates?v=true'
|
2017-02-16 14:41:42 -05:00
|
|
|
name template order version
|
2016-09-20 04:40:23 -04:00
|
|
|
template0 te* 0
|
|
|
|
template1 tea* 1
|
|
|
|
template2 teak* 2 7
|
|
|
|
--------------------------------------------------
|
|
|
|
|
|
|
|
The output shows that there are three existing templates,
|
2017-02-16 14:41:42 -05:00
|
|
|
with template2 having a version value.
|
2016-09-20 04:40:23 -04:00
|
|
|
|
|
|
|
The endpoint also supports giving a template name or pattern in the url
|
|
|
|
to filter the results, for example `/_cat/templates/template*` or
|
|
|
|
`/_cat/templates/template0`.
|