template-exists.asciidoc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [[indices-template-exists]]
  2. === Index template exists API
  3. ++++
  4. <titleabbrev>Index template exists</titleabbrev>
  5. ++++
  6. Checks if an <<index-templates, index template>> exists.
  7. [source,console]
  8. -----------------------------------------------
  9. HEAD /_template/template_1
  10. -----------------------------------------------
  11. [[template-exists-api-request]]
  12. ==== {api-request-title}
  13. `HEAD /_template/<index-template>`
  14. [[template-exists-api-desc]]
  15. ==== {api-description-title}
  16. Use the index template exists API
  17. to determine whether one or more index templates exist.
  18. Index templates define <<index-modules-settings,settings>>, <<mapping,mappings>>,
  19. and <<indices-aliases,aliases>> that can be applied automatically to new indices.
  20. [[template-exists-api-path-params]]
  21. ==== {api-path-parms-title}
  22. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
  23. [[template-exists-api-query-params]]
  24. ==== {api-query-parms-title}
  25. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  26. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
  27. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  28. [[template-exists-api-response-codes]]
  29. ==== {api-response-codes-title}
  30. `200`::
  31. Indicates all specified index templates exist.
  32. `404`::
  33. Indicates one or more specified index templates **do not** exist.