template-exists.asciidoc 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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,js]
  8. -----------------------------------------------
  9. HEAD /_template/template_1
  10. -----------------------------------------------
  11. // CONSOLE
  12. [[template-exists-api-request]]
  13. ==== {api-request-title}
  14. `HEAD /_template/<index-template>`
  15. [[template-exists-api-desc]]
  16. ==== {api-description-title}
  17. Use the index template exists API
  18. to determine whether one or more index templates exist.
  19. include::templates.asciidoc[tag=index-template-def]
  20. [[template-exists-api-path-params]]
  21. ==== {api-path-parms-title}
  22. include::{docdir}/rest-api/common-parms.asciidoc[tag=index-template]
  23. [[template-exists-api-query-params]]
  24. ==== {api-query-parms-title}
  25. include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  26. include::{docdir}/rest-api/common-parms.asciidoc[tag=local]
  27. include::{docdir}/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.