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] Added note about GET requests with bodies to API conventions #74805

Merged
merged 2 commits into from
Jul 1, 2021
Merged
Changes from all commits
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
10 changes: 8 additions & 2 deletions docs/reference/api-conventions.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,13 @@

The {es} REST APIs are exposed over HTTP.

The conventions listed in this chapter can be applied throughout the REST
API, unless otherwise specified.
A number of {es} GET APIs--most notably the search API--support a request body.
While the GET action makes sense in the context of retrieving information,
GET requests with a body are not supported by all HTTP libraries.
All {es} GET APIs that require a body can also be submitted as POST requests.
Alternatively, you can pass the request body as the
<<api-request-body-query-string, `source` query string parameter>>
when using GET.

* <<multi-index>>
* <<date-math-index-names>>
Expand Down Expand Up @@ -672,6 +677,7 @@ The response looks like:
// TESTRESPONSE[s/"stack_trace": "java.lang.Number.+\.\.\."/"stack_trace": $body.error.caused_by.stack_trace/]

[discrete]
[[api-request-body-query-string]]
==== Request body in query string

For libraries that don't accept a request body for non-POST requests,
Expand Down