Skip to content

Commit

Permalink
[DOCS] Reformat type exists API docs (#47601)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrodewig authored Oct 7, 2019
1 parent 63bb4c9 commit f93bb9d
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 9 deletions.
2 changes: 0 additions & 2 deletions docs/reference/indices/indices-exists.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -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]
--------------------------------------------------
Expand Down
38 changes: 31 additions & 7 deletions docs/reference/indices/types-exists.asciidoc
Original file line number Diff line number Diff line change
@@ -1,16 +1,40 @@
[[indices-types-exists]]
=== Types Exists
=== Type exists API
++++
<titleabbrev>Type exists</titleabbrev>
++++

deprecated[7.0.0, Types are deprecated and are in the process of being removed. See <<removal-of-types>>.]
deprecated::[7.0.0, Types are deprecated and are in the process of being removed. See <<removal-of-types>>.]

Used to check if a type/types exists in an index/indices.
Checks if a <<mapping-type-field,mapping type>> 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 /<index>/mapping/<type>`


[[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.
7 changes: 7 additions & 0 deletions docs/reference/rest-api/common-parms.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -713,6 +713,13 @@ end::master-timeout[]

end::timeoutparms[]

tag::type[]
`<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.
Expand Down

0 comments on commit f93bb9d

Please sign in to comment.