From f93bb9dac50df89596d9e43b0e05786ecf2c7ed9 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Mon, 7 Oct 2019 08:49:42 -0400 Subject: [PATCH] [DOCS] Reformat type exists API docs (#47601) --- .../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 aea2caf212494..eb7936a7583a0 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,console] -------------------------------------------------- diff --git a/docs/reference/indices/types-exists.asciidoc b/docs/reference/indices/types-exists.asciidoc index 2a5fc3f4c1ef3..53626c31d94a6 100644 --- a/docs/reference/indices/types-exists.asciidoc +++ b/docs/reference/indices/types-exists.asciidoc @@ -1,16 +1,40 @@ [[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,console] --------------------------------------------------- +---- HEAD twitter/_mapping/tweet --------------------------------------------------- +---- // 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 80603d386a436..eab5f127c7262 100644 --- a/docs/reference/rest-api/common-parms.asciidoc +++ b/docs/reference/rest-api/common-parms.asciidoc @@ -713,6 +713,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.