Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DOCS] Reformat type exists API docs #47601

Merged
merged 2 commits into from
Oct 7, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
36 changes: 30 additions & 6 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>>.]

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 @@ -678,6 +678,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. Defaults
Expand Down