delete-index.asciidoc 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. [[indices-delete-index]]
  2. === Delete index API
  3. ++++
  4. <titleabbrev>Delete index</titleabbrev>
  5. ++++
  6. Deletes an existing index.
  7. [source,console]
  8. --------------------------------------------------
  9. DELETE /my-index-000001
  10. --------------------------------------------------
  11. // TEST[setup:my_index]
  12. [[delete-index-api-request]]
  13. ==== {api-request-title}
  14. `DELETE /<index>`
  15. [[delete-index-api-prereqs]]
  16. ==== {api-prereq-title}
  17. * If the {es} {security-features} are enabled, you must have the `delete_index`
  18. or `manage` <<privileges-list-indices,index privilege>> for the target index.
  19. [[delete-index-api-path-params]]
  20. ==== {api-path-parms-title}
  21. `<index>`::
  22. +
  23. --
  24. (Required, string) Comma-separated list of indices to delete. You cannot specify
  25. <<aliases,index aliases>>.
  26. By default, this parameter does not support wildcards (`*`) or `_all`. To use
  27. wildcards or `_all`, change the `action.destructive_requires_name` setting to
  28. `false`. You can update this setting in the `elasticsearch.yml` file or using
  29. the <<cluster-update-settings,cluster update settings>> API. Wildcard patterns
  30. only match open, concrete indices.
  31. NOTE: You cannot delete the current write index of a data stream. To delete the
  32. index, you must <<data-streams-rollover,roll over>> the data stream so a new
  33. write index is created. You can then use the delete index API to delete the
  34. previous write index.
  35. --
  36. [[delete-index-api-query-params]]
  37. ==== {api-query-parms-title}
  38. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
  39. +
  40. Defaults to `true`.
  41. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
  42. +
  43. Defaults to `open`.
  44. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
  45. include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]