2020-07-09 13:12:38 -04:00
|
|
|
[role="xpack"]
|
2020-05-15 10:37:45 -04:00
|
|
|
[[indices-delete-data-stream]]
|
|
|
|
=== Delete data stream API
|
|
|
|
++++
|
|
|
|
<titleabbrev>Delete data stream</titleabbrev>
|
|
|
|
++++
|
|
|
|
|
2020-06-18 10:59:12 -04:00
|
|
|
Deletes one or more <<data-streams,data streams>> and their backing
|
|
|
|
indices. See <<delete-a-data-stream>>.
|
2020-05-15 10:37:45 -04:00
|
|
|
|
|
|
|
////
|
|
|
|
[source,console]
|
2020-06-18 10:59:12 -04:00
|
|
|
----
|
|
|
|
PUT /_index_template/template
|
2020-05-15 10:37:45 -04:00
|
|
|
{
|
2020-05-28 09:08:25 -04:00
|
|
|
"index_patterns": ["my-data-stream*"],
|
2020-06-12 09:24:42 -04:00
|
|
|
"template": {
|
|
|
|
"mappings": {
|
|
|
|
"properties": {
|
|
|
|
"@timestamp": {
|
|
|
|
"type": "date"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
2020-05-28 09:08:25 -04:00
|
|
|
"data_stream": {
|
|
|
|
"timestamp_field": "@timestamp"
|
|
|
|
}
|
2020-05-15 10:37:45 -04:00
|
|
|
}
|
2020-05-28 09:08:25 -04:00
|
|
|
|
|
|
|
PUT /_data_stream/my-data-stream
|
2020-06-18 10:59:12 -04:00
|
|
|
----
|
2020-05-15 10:37:45 -04:00
|
|
|
// TESTSETUP
|
|
|
|
////
|
|
|
|
|
|
|
|
[source,console]
|
2020-06-18 10:59:12 -04:00
|
|
|
----
|
|
|
|
DELETE /_data_stream/my-data-stream
|
|
|
|
----
|
2020-05-15 10:37:45 -04:00
|
|
|
|
2020-05-28 09:08:25 -04:00
|
|
|
////
|
|
|
|
[source,console]
|
2020-06-18 10:59:12 -04:00
|
|
|
----
|
2020-05-28 09:08:25 -04:00
|
|
|
DELETE /_index_template/template
|
2020-06-18 10:59:12 -04:00
|
|
|
----
|
2020-05-28 09:08:25 -04:00
|
|
|
// TEST[continued]
|
|
|
|
////
|
2020-05-15 10:37:45 -04:00
|
|
|
|
|
|
|
[[delete-data-stream-api-request]]
|
|
|
|
==== {api-request-title}
|
|
|
|
|
2020-06-18 10:59:12 -04:00
|
|
|
`DELETE /_data_stream/<data-stream>`
|
2020-05-15 10:37:45 -04:00
|
|
|
|
|
|
|
|
|
|
|
[[delete-data-stream-api-path-params]]
|
|
|
|
==== {api-path-parms-title}
|
|
|
|
|
|
|
|
`<data-stream>`::
|
2020-06-18 10:59:12 -04:00
|
|
|
(Required, string)
|
2020-07-13 10:11:25 -04:00
|
|
|
Comma-separated list of data streams to delete.
|
2020-06-18 10:59:12 -04:00
|
|
|
Wildcard (`*`) expressions are supported.
|