anchor.diff:  [[cat-templates]]
   === cat templates
   
  -The `templates` command provides information about existing templates.
  +Returns information about <<indices-templates,index templates>> in a cluster.
  +You can use index templates to apply <<index-modules-settings,index settings>>
  +and <<mapping,field mappings>> to new indices at creation.
  +
  +
  +[[cat-templates-api-request]]
  +==== {api-request-title}
  +
  +`GET /_cat/templates/{template_name}`
  +
  +
  +[[cat-templates-path-params]]
  +==== {api-path-parms-title}
  +
  +`{template_name}`::
  +(Optional, string) Comma-separated list of index template names used to limit
  +the request. Accepts wildcard expressions.
  +
  +
  +[[cat-templates-query-params]]
  +==== {api-query-parms-title}
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=http-format]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-h]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=help]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-s]
  +
  +include::{docdir}/rest-api/common-parms.asciidoc[tag=cat-v]
  +
  +
  +[[cat-templates-api-example]]
  +==== {api-examples-title}
   
   [source,js]
   --------------------------------------------------
  
positive.code: template2 [teak*]        2     7
  --------------------------------------------------
  // TESTRESPONSE[s/\*/\\*/ s/\[/\\[/ s/\]/\\]/ non_json]
  
  The output shows that there are three existing templates,
  with template2 having a version value.
  
  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`.
  
negative.code: //    templates.
  // 2. Create some templates to expect in the response.
  
  The API returns the following response:
  
  [source,txt]
  --------------------------------------------------
  