template-exists.asciidoc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. [[indices-template-exists]]
  2. === Index template exists API
  3. ++++
  4. <titleabbrev>Index template exists</titleabbrev>
  5. ++++
  6. Checks if an 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. include::templates.asciidoc[tag=index-template-def]
  19. [[template-exists-api-path-params]]
  20. ==== {api-path-parms-title}
  21. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
  22. [[template-exists-api-query-params]]
  23. ==== {api-query-parms-title}
  24. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  25. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
  26. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  27. [[template-exists-api-response-codes]]
  28. ==== {api-response-codes-title}
  29. `200`::
  30. Indicates all specified index templates exist.
  31. `404`::
  32. Indicates one or more specified index templates **do not** exist.