index-template-exists-v1.asciidoc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. [[indices-template-exists-v1]]
  2. === Index template exists API
  3. ++++
  4. <titleabbrev>Index template exists (legacy)</titleabbrev>
  5. ++++
  6. IMPORTANT: This documentation is about <<indices-templates-v1,legacy index
  7. templates>>, which are deprecated and will be replaced by the composable
  8. templates introduced in {es} 7.8. For information about composable templates,
  9. see <<index-templates>>.
  10. Checks if an <<indices-templates-v1,legacy index template>> exists.
  11. [source,console]
  12. -----------------------------------------------
  13. HEAD /_template/template_1
  14. -----------------------------------------------
  15. [[template-exists-api-request]]
  16. ==== {api-request-title}
  17. `HEAD /_template/<index-template>`
  18. [[template-exists-api-prereqs]]
  19. ==== {api-prereq-title}
  20. * If the {es} {security-features} are enabled, you must have the
  21. `manage_index_templates` or `manage` <<privileges-list-cluster,cluster
  22. privilege>> to use this API.
  23. [[template-exists-api-desc]]
  24. ==== {api-description-title}
  25. Use the index template exists API
  26. to determine whether one or more index templates exist.
  27. Index templates define <<index-modules-settings,settings>>, <<mapping,mappings>>,
  28. and <<alias,aliases>> that can be applied automatically to new indices.
  29. [[template-exists-api-path-params]]
  30. ==== {api-path-parms-title}
  31. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
  32. [[template-exists-api-query-params]]
  33. ==== {api-query-parms-title}
  34. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=flat-settings]
  35. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
  36. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=master-timeout]
  37. [[template-exists-api-response-codes]]
  38. ==== {api-response-codes-title}
  39. `200`::
  40. Indicates all specified index templates exist.
  41. `404`::
  42. Indicates one or more specified index templates **do not** exist.