2021-01-11 14:28:10 -05:00
|
|
|
[[indices-template-exists-v1]]
|
2019-08-29 13:18:47 -04:00
|
|
|
=== Index template exists API
|
|
|
|
++++
|
2021-01-11 14:28:10 -05:00
|
|
|
<titleabbrev>Index template exists (legacy)</titleabbrev>
|
2019-08-29 13:18:47 -04:00
|
|
|
++++
|
|
|
|
|
2021-01-11 14:28:10 -05:00
|
|
|
IMPORTANT: This documentation is about <<indices-templates-v1,legacy index
|
|
|
|
templates>>, which are deprecated and will be replaced by the composable
|
|
|
|
templates introduced in {es} 7.8. For information about composable templates,
|
|
|
|
see <<index-templates>>.
|
|
|
|
|
|
|
|
Checks if an <<indices-templates-v1,legacy index template>> exists.
|
2019-08-29 13:18:47 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
2020-07-23 19:48:19 -07:00
|
|
|
Index templates define <<index-modules-settings,settings>>, <<mapping,mappings>>,
|
|
|
|
and <<indices-aliases,aliases>> that can be applied automatically to new indices.
|
2019-08-29 13:18:47 -04:00
|
|
|
|
|
|
|
[[template-exists-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
2020-06-01 16:42:53 -07: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 16:42:53 -07:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
|
2019-08-29 13:18:47 -04:00
|
|
|
|
2020-06-01 16:42:53 -07:00
|
|
|
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
|
2019-08-29 13:18:47 -04:00
|
|
|
|
2020-06-01 16:42:53 -07: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.
|