From 0e25fa86ad42e6fe93c06aa7c60be3523fd61cae Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Fri, 4 Oct 2019 14:56:31 -0400 Subject: [PATCH 1/2] [DOCS] Reformat type exists API docs --- .../reference/indices/indices-exists.asciidoc | 2 -- docs/reference/indices/types-exists.asciidoc | 36 +++++++++++++++---- docs/reference/rest-api/common-parms.asciidoc | 7 ++++ 3 files changed, 37 insertions(+), 8 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..e6451194c7001 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 <>.] -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 93e1a35d93870..4aacb09c091cf 100644 --- a/docs/reference/rest-api/common-parms.asciidoc +++ b/docs/reference/rest-api/common-parms.asciidoc @@ -678,6 +678,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 From 7ecd978a02820a57f1f677e56027b28caa1da540 Mon Sep 17 00:00:00 2001 From: James Rodewig Date: Mon, 7 Oct 2019 08:36:23 -0400 Subject: [PATCH 2/2] iter --- docs/reference/indices/types-exists.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/reference/indices/types-exists.asciidoc b/docs/reference/indices/types-exists.asciidoc index e6451194c7001..53626c31d94a6 100644 --- a/docs/reference/indices/types-exists.asciidoc +++ b/docs/reference/indices/types-exists.asciidoc @@ -4,9 +4,9 @@ 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 <>.] -Checks if a <> exists. +Checks if a <> exists. [source,console] ----