delete-index-template.asciidoc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [[indices-delete-template]]
  2. === Delete index template API
  3. ++++
  4. <titleabbrev>Delete index template</titleabbrev>
  5. ++++
  6. Deletes an <<index-templates,index template>>.
  7. ////
  8. [source,console]
  9. ----
  10. PUT /_index_template/my-index-template
  11. {
  12. "index_patterns" : ["te*"],
  13. "template": {
  14. "settings": {
  15. "number_of_shards": 1
  16. }
  17. }
  18. }
  19. ----
  20. // TESTSETUP
  21. ////
  22. [source,console]
  23. ----
  24. DELETE /_index_template/my-index-template
  25. ----
  26. [[delete-template-api-request]]
  27. ==== {api-request-title}
  28. `DELETE /_index_template/<index-template>`
  29. [[delete-template-api-prereqs]]
  30. ==== {api-prereq-title}
  31. * If the {es} {security-features} are enabled, you must have the
  32. `manage_index_templates` or `manage` <<privileges-list-cluster,cluster
  33. privilege>> to use this API.
  34. [[delete-template-api-desc]]
  35. ==== {api-description-title}
  36. Use the delete index template API to delete one or more index templates.
  37. Index templates define <<index-modules-settings,settings>>, <<mapping,mappings>>,
  38. and <<indices-aliases,aliases>> that can be applied automatically to new indices.
  39. [[delete-template-api-path-params]]
  40. ==== {api-path-parms-title}
  41. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-template]
  42. [[delete-template-api-query-params]]
  43. ==== {api-query-parms-title}
  44. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]