elasticsearch/docs/reference/indices/delete-data-stream.asciidoc

64 lines
1.3 KiB
Text

[role="xpack"]
[[indices-delete-data-stream]]
=== Delete data stream API
++++
<titleabbrev>Delete data stream</titleabbrev>
++++
Deletes one or more <<data-streams,data streams>> and their backing
indices. See <<delete-a-data-stream>>.
////
[source,console]
----
PUT /_index_template/template
{
"index_patterns": ["my-data-stream*"],
"data_stream": { }
}
PUT /_data_stream/my-data-stream
----
// TESTSETUP
////
[source,console]
----
DELETE /_data_stream/my-data-stream
----
////
[source,console]
----
DELETE /_index_template/template
----
// TEST[continued]
////
[[delete-data-stream-api-request]]
==== {api-request-title}
`DELETE /_data_stream/<data-stream>`
[[delete-data-stream-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 data stream.
[[delete-data-stream-api-path-params]]
==== {api-path-parms-title}
`<data-stream>`::
(Required, string)
Comma-separated list of data streams to delete.
Wildcard (`*`) expressions are supported.
[role="child_attributes"]
[[delete-data-stream-api-query-parms]]
==== {api-query-parms-title}
include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=ds-expand-wildcards]
+
Defaults to `open`.