123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101 |
- [[indices-get-data-stream]]
- === Get data stream API
- ++++
- <titleabbrev>Get data stream</titleabbrev>
- ++++
- Retrieves information about one or more <<data-streams,data streams>>.
- See <<get-info-about-a-data-stream>>.
- ////
- [source,console]
- ----
- PUT _index_template/template
- {
- "index_patterns": ["my-data-stream*"],
- "template": {
- "mappings": {
- "properties": {
- "@timestamp": {
- "type": "date"
- }
- }
- }
- },
- "data_stream": {
- "timestamp_field": "@timestamp"
- }
- }
- PUT /_data_stream/my-data-stream
- ----
- // TESTSETUP
- ////
- ////
- [source,console]
- ----
- DELETE /_data_stream/my-data-stream
- DELETE /_index_template/template
- ----
- // TEARDOWN
- ////
- [source,console]
- ----
- GET /_data_stream/my-data-stream
- ----
- // TEST[skip_shard_failures]
- [[get-data-stream-api-request]]
- ==== {api-request-title}
- `GET /_data_stream/<data-stream>`
- [[get-data-stream-api-path-params]]
- ==== {api-path-parms-title}
- `<data-stream>`::
- (Required, string)
- Name of the data stream to retrieve.
- Wildcard (`*`) expressions are supported.
- [[get-data-stream-api-example]]
- ==== {api-examples-title}
- [source,console]
- ----
- GET _data_stream/my-data-stream*
- ----
- // TEST[continued]
- // TEST[skip_shard_failures]
- The API returns the following response:
- [source,console-result]
- ----
- [
- {
- "name" : "my-data-stream", <1>
- "timestamp_field" : "@timestamp", <2>
- "indices" : [ <3>
- {
- "index_name" : ".ds-my-data-stream-000001",
- "index_uuid" : "DXAE-xcCQTKF93bMm9iawA"
- },
- {
- "index_name" : ".ds-my-data-stream-000002",
- "index_uuid" : "Wzxq0VhsQKyPxHhaK3WYAg"
- }
- ],
- "generation" : 2 <4>
- }
- ]
- ----
- // TESTRESPONSE[skip:unable to assert responses with top level array]
- <1> Name of the data stream
- <2> The name of the timestamp field for the data stream
- <3> List of backing indices
- <4> Current generation for the data stream
|