11[[indices-delete-index]]
2- === Delete Index
2+ === Delete index API
3+ ++++
4+ <titleabbrev>Delete index</titleabbrev>
5+ ++++
36
4- The delete index API allows to delete an existing index.
7+ Deletes an existing index.
58
69[source,js]
710--------------------------------------------------
@@ -10,13 +13,42 @@ DELETE /twitter
1013// CONSOLE
1114// TEST[setup:twitter]
1215
13- The above example deletes an index called `twitter`. Specifying an index or a
14- wildcard expression is required. Aliases cannot be used to delete an index.
15- Wildcard expressions are resolved to matching concrete indices only.
1616
17- The delete index API can also be applied to more than one index, by either
18- using a comma separated list, or on all indices (be careful!) by using `_all` or `*` as index.
17+ [[ delete- index-api-request]]
18+ ==== {api-request-title}
1919
20- In order to disable allowing to delete indices via wildcards or `_all`,
21- set `action.destructive_requires_name` setting in the config to `true`.
22- This setting can also be changed via the cluster update settings api.
20+ `DELETE /<index>`
21+
22+
23+ [[delete-index-api-path-params]]
24+ ==== {api-path-parms-title}
25+
26+ `<index>`::
27+ +
28+ --
29+ (Request, string) Comma-separated list or wildcard expression of indices to
30+ delete.
31+
32+ In this parameter, wildcard expressions match only open, concrete indices. You
33+ cannot delete an index using an <<indices-aliases,alias>>.
34+
35+ To delete all indices, use `_all` or `*` . To disallow the deletion of indices
36+ with `_all` or wildcard expressions, change the
37+ `action.destructive_requires_name` cluster setting to `true`. You can update
38+ this setting in the `elasticsearch.yml` file or using the
39+ <<cluster-update-settings,cluster update settings>> API.
40+ --
41+
42+
43+ [[delete-index-api-query-params]]
44+ ==== {api-query-parms-title}
45+
46+ include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]
47+
48+ include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
49+ +
50+ Defaults to `open`.
51+
52+ include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]
53+
54+ include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]
0 commit comments