Browse Source

[DOCS] Update exists API for data streams (#73180)

Updates the exists API docs to better reflect its support of data streams and
aliases.

Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>
James Rodewig 4 years ago
parent
commit
a11ea87041
2 changed files with 16 additions and 21 deletions
  1. 1 1
      docs/reference/indices.asciidoc
  2. 15 20
      docs/reference/indices/indices-exists.asciidoc

+ 1 - 1
docs/reference/indices.asciidoc

@@ -106,6 +106,7 @@ include::indices/delete-index.asciidoc[]
 include::indices/delete-alias.asciidoc[]
 include::indices/delete-index-template.asciidoc[]
 include::indices/delete-index-template-v1.asciidoc[]
+include::indices/indices-exists.asciidoc[]
 include::indices/flush.asciidoc[]
 include::indices/forcemerge.asciidoc[]
 include::indices/apis/freeze.asciidoc[]
@@ -119,7 +120,6 @@ include::indices/get-index-template-v1.asciidoc[]
 include::indices/get-mapping.asciidoc[]
 include::indices/dangling-index-import.asciidoc[]
 include::indices/alias-exists.asciidoc[]
-include::indices/indices-exists.asciidoc[]
 include::indices/recovery.asciidoc[]
 include::indices/segments.asciidoc[]
 include::indices/shard-stores.asciidoc[]

+ 15 - 20
docs/reference/indices/indices-exists.asciidoc

@@ -1,40 +1,36 @@
 [[indices-exists]]
-=== Index exists API
+=== Exists API
 ++++
-<titleabbrev>Index exists</titleabbrev>
+<titleabbrev>Exists</titleabbrev>
 ++++
 
-Checks if an index exists.
-The returned HTTP status code indicates if the index exists or not.
-A `404` means it does not exist, and `200` means it does.
+Checks if a data stream, index, or alias exists.
 
 [source,console]
---------------------------------------------------
-HEAD /my-index-000001
---------------------------------------------------
-// TEST[setup:my_index]
-
+----
+HEAD my-data-stream
+----
+// TEST[setup:my_data_stream]
+// TEST[teardown:data_stream_cleanup]
 
 [[indices-exists-api-request]]
 ==== {api-request-title}
 
-`HEAD /<target>`
+`HEAD <target>`
 
 [[indices-exists-api-prereqs]]
 ==== {api-prereq-title}
 
 * If the {es} {security-features} are enabled, you must have the
 `view_index_metadata` or `manage` <<privileges-list-indices,index privilege>>
-for the target data stream, index, or index alias.
+for the target.
 
 [[indices-exists-api-path-params]]
 ==== {api-path-parms-title}
 
 `<target>`::
-(Optional, string)
-Comma-separated list of data streams, indices, and index aliases used to limit
-the request. Wildcard expressions (`*`) are supported.
-
+(Optional, string) Comma-separated list of data streams, indices, and aliases.
+Supports wildcards (`*`).
 
 [[indices-exists-api-query-params]]
 ==== {api-query-parms-title}
@@ -55,12 +51,11 @@ include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailab
 
 include::{es-repo-dir}/rest-api/common-parms.asciidoc[tag=local]
 
-
 [[indices-exists-api-response-codes]]
 ==== {api-response-codes-title}
 
 `200`::
-Indicates all specified indices or index aliases exist.
+All targets exist.
 
- `404`::
-Indicates one or more specified indices or index aliases **do not** exist.
+`404`::
+One or more specified targets do not exist.