1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- [[indices-delete-index]]
- === Delete index API
- ++++
- <titleabbrev>Delete index</titleabbrev>
- ++++
- Deletes an existing index.
- [source,console]
- --------------------------------------------------
- DELETE /my-index-000001
- --------------------------------------------------
- // TEST[setup:my_index]
- [[delete-index-api-request]]
- ==== {api-request-title}
- `DELETE /<index>`
- [[delete-index-api-prereqs]]
- ==== {api-prereq-title}
- * If the {es} {security-features} are enabled, you must have the `delete_index`
- or `manage` <<privileges-list-indices,index privilege>> for the target index.
- [[delete-index-api-path-params]]
- ==== {api-path-parms-title}
- `<index>`::
- +
- --
- (Request, string) Comma-separated list or wildcard expression of indices to
- delete.
- In this parameter, wildcard expressions match only open, concrete indices. You
- cannot delete an index using an <<alias,alias>>.
- By default, you must explicitly name the indices you are deleting.
- To specify indices to delete with `_all`, `*`, or other wildcard
- expressions, change the `action.destructive_requires_name` setting to `false`.
- You can update this setting in the `elasticsearch.yml` file or using the
- <<cluster-update-settings,cluster update settings>> API.
- NOTE: You cannot delete the current write index of a data stream. To delete the
- index, you must <<data-streams-rollover,roll over>> the data stream so a new
- write index is created. You can then use the delete index API to delete the
- previous write index.
- --
- [[delete-index-api-query-params]]
- ==== {api-query-parms-title}
- include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
- +
- Defaults to `true`.
- include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
- +
- Defaults to `open`.
- include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
- include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
|