From d3d1752c8b7673b23c6b054514fc3ee985d3c66c Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Mon, 7 Oct 2019 09:13:38 -0400 Subject: [PATCH] [DOCS] Reformat type exists API docs (#47601) (#47654) --- .../reference/indices/indices-exists.asciidoc | 2 - docs/reference/indices/types-exists.asciidoc | 38 +++++++++++++++---- docs/reference/rest-api/common-parms.asciidoc | 7 ++++ 3 files changed, 38 insertions(+), 9 deletions(-) diff --git a/docs/reference/indices/indices-exists.asciidoc b/docs/reference/indices/indices-exists.asciidoc index bd96d428d48a1..472db64de2fb9 100644 --- a/docs/reference/indices/indices-exists.asciidoc +++ b/docs/reference/indices/indices-exists.asciidoc @@ -5,8 +5,6 @@ ++++ 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] -------------------------------------------------- diff --git a/docs/reference/indices/types-exists.asciidoc b/docs/reference/indices/types-exists.asciidoc index 7139b4cc78541..be58f4fd2fd5d 100644 --- a/docs/reference/indices/types-exists.asciidoc +++ b/docs/reference/indices/types-exists.asciidoc @@ -1,17 +1,41 @@ [[indices-types-exists]] -=== Types Exists +=== Type exists API +++++ +Type exists +++++ -deprecated[7.0.0, Types are deprecated and are in the process of being removed. See <>.] +deprecated::[7.0.0, Types are deprecated and are in the process of being removed. See <>.] -Used to check if a type/types exists in an index/indices. +Checks if a <> exists. [source,js] --------------------------------------------------- +---- HEAD twitter/_mapping/tweet --------------------------------------------------- +---- // CONSOLE // TEST[setup:twitter] // TEST[warning:Type exists requests are deprecated, as types have been deprecated.] -The HTTP status code indicates if the type exists or not. A `404` means -it does not exist, and `200` means it does. + +[[indices-types-exists-api-request]] +==== {api-request-title} + +`HEAD //mapping/` + + +[[indices-types-exists-api-path-params]] +==== {api-path-parms-title} + +include::{docdir}/rest-api/common-parms.asciidoc[tag=index] + +include::{docdir}/rest-api/common-parms.asciidoc[tag=type] + + +[[indices-types-exists-api-response-codes]] +==== {api-response-codes-title} + +`200`:: +Indicates all specified mapping types exist. + + `404`:: +Indicates one or more specified mapping types **do not** exist. diff --git a/docs/reference/rest-api/common-parms.asciidoc b/docs/reference/rest-api/common-parms.asciidoc index ae7dc28dca705..a51e38d4f95aa 100644 --- a/docs/reference/rest-api/common-parms.asciidoc +++ b/docs/reference/rest-api/common-parms.asciidoc @@ -662,6 +662,13 @@ end::master-timeout[] end::timeoutparms[] +tag::type[] +``:: +(Optional, string) +Comma-separated list or wildcard expression of types +used to limit the request. +end::type[] + tag::cat-v[] `v`:: (Optional, boolean) If `true`, the response includes column headings. Defaults