Skip to content

Commit

Permalink
[DOCS] Reformat delete index API docs (#45755)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodewig committed Aug 23, 2019
1 parent 7367855 commit 8cac063
Showing 1 changed file with 42 additions and 10 deletions.
52 changes: 42 additions & 10 deletions docs/reference/indices/delete-index.asciidoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
[[indices-delete-index]]
=== Delete Index
=== Delete index API
++++
<titleabbrev>Delete index</titleabbrev>
++++

The delete index API allows to delete an existing index.
Deletes an existing index.

[source,js]
--------------------------------------------------
Expand All @@ -10,13 +13,42 @@ DELETE /twitter
// CONSOLE
// TEST[setup:twitter]

The above example deletes an index called `twitter`. Specifying an index or a
wildcard expression is required. Aliases cannot be used to delete an index.
Wildcard expressions are resolved to matching concrete indices only.

The delete index API can also be applied to more than one index, by either
using a comma separated list, or on all indices (be careful!) by using `_all` or `*` as index.
[[delete-index-api-request]]
==== {api-request-title}

In order to disable allowing to delete indices via wildcards or `_all`,
set `action.destructive_requires_name` setting in the config to `true`.
This setting can also be changed via the cluster update settings api.
`DELETE /<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 <<indices-aliases,alias>>.

To delete all indices, use `_all` or `*` . To disallow the deletion of indices
with `_all` or wildcard expressions, change the
`action.destructive_requires_name` cluster setting to `true`. You can update
this setting in the `elasticsearch.yml` file or using the
<<cluster-update-settings,cluster update settings>> API.
--


[[delete-index-api-query-params]]
==== {api-query-parms-title}

include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices]

include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards]
+
Defaults to `open`.

include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable]

include::{docdir}/rest-api/common-parms.asciidoc[tag=timeoutparms]

0 comments on commit 8cac063

Please sign in to comment.