From 23c3b1ecf0d3ad9428ad21f7c89329127a904812 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Mon, 26 Aug 2019 10:07:11 -0400 Subject: [PATCH] [DOCS] Reformat indices exists API docs (#45918) --- .../reference/indices/indices-exists.asciidoc | 54 ++++++++++++++++--- 1 file changed, 48 insertions(+), 6 deletions(-) diff --git a/docs/reference/indices/indices-exists.asciidoc b/docs/reference/indices/indices-exists.asciidoc index 4a1b9c36cac9c..b85210af96d15 100644 --- a/docs/reference/indices/indices-exists.asciidoc +++ b/docs/reference/indices/indices-exists.asciidoc @@ -1,17 +1,59 @@ [[indices-exists]] -=== Indices Exists +=== Indices exists API +++++ +Indices exists +++++ -Used to check if the index (indices) exists or not. For example: +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. [source,js] -------------------------------------------------- -HEAD twitter +HEAD /twitter -------------------------------------------------- // CONSOLE // TEST[setup:twitter] -The HTTP status code indicates if the index exists or not. A `404` means -it does not exist, and `200` means it does. -IMPORTANT: This request does not distinguish between an index and an alias, +[[indices-exists-api-request]] +==== {api-request-title} + +`HEAD /` + + +[[indices-exists-api-path-params]] +==== {api-path-parms-title} + +include::{docdir}/rest-api/common-parms.asciidoc[tag=index] ++ +IMPORTANT: This parameter does not distinguish between an index name and <>, i.e. status code `200` is also returned if an alias exists with that name. + + +[[indices-exists-api-query-params]] +==== {api-query-parms-title} + +include::{docdir}/rest-api/common-parms.asciidoc[tag=allow-no-indices] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=expand-wildcards] ++ +Defaults to `open`. + +include::{docdir}/rest-api/common-parms.asciidoc[tag=flat-settings] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=include-defaults] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=index-ignore-unavailable] + +include::{docdir}/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. + + `404`:: +Indicates one or more specified indices or index aliases **do not** exist.