2019-08-29 13:18:47 -04:00
|
|
|
[[indices-template-exists]]
|
|
|
|
=== Index template exists API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Index template exists</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
|
|
|
Checks if an index template exists.
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-09-06 11:31:13 -04:00
|
|
|
[source,console]
|
2019-08-29 13:18:47 -04:00
|
|
|
-----------------------------------------------
|
|
|
|
HEAD /_template/template_1
|
|
|
|
-----------------------------------------------
|
|
|
|
|
|
|
|
|
|
|
|
[[template-exists-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
|
|
|
`HEAD /_template/<index-template>`
|
|
|
|
|
|
|
|
|
|
|
|
[[template-exists-api-desc]]
|
|
|
|
==== {api-description-title}
|
|
|
|
|
|
|
|
Use the index template exists API
|
|
|
|
to determine whether one or more index templates exist.
|
|
|
|
|
|
|
|
include::templates.asciidoc[tag=index-template-def]
|
|
|
|
|
|
|
|
|
|
|
|
[[template-exists-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
|
2019-08-29 13:18:47 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[template-exists-api-query-params]]
|
|
|
|
==== {api-query-parms-title}
|
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
|
2019-08-29 13:18:47 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
|
2019-08-29 13:18:47 -04:00
|
|
|
|
2020-06-01 19:42:53 -04:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
|
2019-08-29 13:18:47 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[template-exists-api-response-codes]]
|
|
|
|
==== {api-response-codes-title}
|
|
|
|
|
|
|
|
`200`::
|
|
|
|
Indicates all specified index templates exist.
|
|
|
|
|
|
|
|
`404`::
|
|
|
|
Indicates one or more specified index templates **do not** exist.
|