Browse Source

[DOCS] Add data streams to cat APIs (#58699)

James Rodewig 5 years ago
parent
commit
b292459ab1

+ 16 - 11
docs/reference/cat/count.asciidoc

@@ -4,8 +4,8 @@
 <titleabbrev>cat count</titleabbrev>
 ++++
 
-Provides quick access to a document count of individual indices or all indices
-in a cluster.
+Provides quick access to a document count for a data stream, an index, or an
+entire cluster.
 
 NOTE: The document count only includes live documents, not deleted documents
 which have not yet been removed by the merge process.
@@ -14,7 +14,7 @@ which have not yet been removed by the merge process.
 [[cat-count-api-request]]
 ==== {api-request-title}
 
-`GET /_cat/count/<index>`
+`GET /_cat/count/<target>`
 
 `GET /_cat/count`
 
@@ -22,8 +22,13 @@ which have not yet been removed by the merge process.
 [[cat-count-api-path-params]]
 ==== {api-path-parms-title}
 
-include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
-
+`<target>`::
+(Optional, string)
+Comma-separated list or wildcard (`*`) expression of data streams, indices,
+and index aliases used to limit the request.
++
+To target all data streams and indices in a cluster, omit this parameter or use
+`_all` or `*`.
 
 [[cat-count-api-query-params]]
 ==== {api-query-parms-title}
@@ -43,10 +48,10 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=cat-v]
 ==== {api-examples-title}
 
 [[cat-count-api-example-ind]]
-===== Example with an individual index
+===== Example with an individual data stream or index
 
-The following `count` API request retrieves the document count of a single
-index, `twitter`.
+The following `count` API request retrieves the document count for the 
+`twitter` data stream or index.
 
 [source,console,id=cat-count-individual-example]
 --------------------------------------------------
@@ -65,10 +70,10 @@ epoch      timestamp count
 // TESTRESPONSE[s/1475868259 15:24:20/\\d+ \\d+:\\d+:\\d+/ non_json]
 
 [[cat-count-api-example-all]]
-===== Example with all indices in a cluster
+===== Example with all data streams and indices in a cluster
 
-The following `count` API request retrieves the document count of all indices in
-the cluster.
+The following `count` API request retrieves the document count for all data
+streams and indices in the cluster.
 
 [source,console,id=cat-count-all-example]
 --------------------------------------------------

+ 10 - 4
docs/reference/cat/indices.asciidoc

@@ -4,13 +4,14 @@
 <titleabbrev>cat indices</titleabbrev>
 ++++
 
-Returns high-level information about indices in a cluster.
+Returns high-level information about indices in a cluster, including backing
+indices for data streams.
 
 
 [[cat-indices-api-request]]
 ==== {api-request-title}
 
-`GET /_cat/indices/<index>`
+`GET /_cat/indices/<target>`
 
 `GET /_cat/indices`
 
@@ -39,8 +40,13 @@ To get an accurate count of {es} documents, use the <<cat-count,cat count>> or
 [[cat-indices-api-path-params]]
 ==== {api-path-parms-title}
 
-include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
-
+`<target>`::
+(Optional, string)
+Comma-separated list or wildcard (`*`) expression of data streams, indices,
+and index aliases used to limit the request.
++
+To target all data streams and indices in a cluster, omit this parameter or use
+`_all` or `*`.
 
 [[cat-indices-api-query-params]]
 ==== {api-query-parms-title}

+ 10 - 2
docs/reference/cat/recovery.asciidoc

@@ -8,11 +8,13 @@
 Returns information about ongoing and completed shard recoveries,
 similar to the <<indices-recovery, index recovery>> API.
 
+For data streams, the API returns information about the stream's backing
+indices.
 
 [[cat-recovery-api-request]]
 ==== {api-request-title}
 
-`GET /_cat/recovery/<index>`
+`GET /_cat/recovery/<target>`
 
 `GET /_cat/recovery`
 
@@ -30,7 +32,13 @@ include::{es-repo-dir}/indices/recovery.asciidoc[tag=shard-recovery-desc]
 [[cat-recovery-path-params]]
 ==== {api-path-parms-title}
 
-include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
+`<target>`::
+(Optional, string)
+Comma-separated list or wildcard (`*`) expression of data streams, indices,
+and index aliases used to limit the request.
++
+To target all data streams and indices in a cluster, omit this parameter or use
+`_all` or `*`.
 
 
 [[cat-recovery-query-params]]

+ 11 - 3
docs/reference/cat/segments.asciidoc

@@ -8,10 +8,13 @@ Returns low-level information about the https://lucene.apache.org/core/[Lucene]
 segments in index shards, similar to the <<indices-segments, indices segments>>
 API.
 
+For data streams, the API returns information about the stream's backing
+indices.
+
 [[cat-segments-api-request]]
 ==== {api-request-title}
 
-`GET /_cat/segments/<index>`
+`GET /_cat/segments/<target>`
 
 `GET /_cat/segments`
 
@@ -19,8 +22,13 @@ API.
 [[cat-segments-path-params]]
 ==== {api-path-parms-title}
 
-include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
-
+`<target>`::
+(Optional, string)
+Comma-separated list or wildcard (`*`) expression of data streams, indices,
+and index aliases used to limit the request.
++
+To target all data streams and indices in a cluster, omit this parameter or use
+`_all` or `*`.
 
 [[cat-segments-query-params]]
 ==== {api-query-parms-title}

+ 18 - 10
docs/reference/cat/shards.asciidoc

@@ -5,14 +5,17 @@
 ++++
 
 The `shards` command is the detailed view of what nodes contain which
-shards.  It will tell you if it's a primary or replica, the number of
+shards. It will tell you if it's a primary or replica, the number of
 docs, the bytes it takes on disk, and the node where it's located.
 
+For data streams, the API returns information about the stream's backing
+indices.
+
 
 [[cat-shards-api-request]]
 ==== {api-request-title}
 
-`GET /_cat/shards/<index>`
+`GET /_cat/shards/<target>`
 
 `GET /_cat/shards`
 
@@ -20,8 +23,13 @@ docs, the bytes it takes on disk, and the node where it's located.
 [[cat-shards-path-params]]
 ==== {api-path-parms-title}
 
-include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index]
-
+`<target>`::
+(Optional, string)
+Comma-separated list or wildcard (`*`) expression of data streams, indices,
+and index aliases used to limit the request.
++
+To target all data streams and indices in a cluster, omit this parameter or use
+`_all` or `*`.
 
 [[cat-shards-query-params]]
 ==== {api-query-parms-title}
@@ -280,7 +288,7 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=cat-v]
 ==== {api-examples-title}
 
 [[cat-shards-api-example-single]]
-===== Example with a single index
+===== Example with a single data stream or index
 
 [source,console]
 ---------------------------------------------------------------------------
@@ -300,13 +308,13 @@ twitter 0 p STARTED 3014 31.1mb 192.168.56.10 H5dfFeA
 // TESTRESPONSE[s/H5dfFeA/node-0/ non_json]
 
 [[cat-shards-api-example-wildcard]]
-===== Example with a index wildcard pattern
+===== Example with a wildcard pattern
 
-If your cluster has many shards, you can use a wildcard pattern in the `{index}`
-path parameter to limit the API request.
+If your cluster has many shards, you can use a wildcard pattern in the
+`<target>` path parameter to limit the API request.
 
-The following request returns information for any indices beginning with
-`twitt`.
+The following request returns information for any data streams or indices
+beginning with `twitt`.
 
 [source,console]
 ---------------------------------------------------------------------------