Skip to content

[7.x] [DOCS] Move JSON encoding section (#71508) #71534

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

Merged
merged 1 commit into from
Apr 10, 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
14 changes: 7 additions & 7 deletions docs/reference/api-conventions.asciidoc
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
[[api-conventions]]
== API conventions

The {es} REST APIs are exposed using JSON over HTTP. The JSON request body must
be UTF-8 encoded. {es} ignores any other encoding headings sent with a request.
Responses are also UTF-8 encoded.
The {es} REST APIs are exposed over HTTP.

The conventions listed in this chapter can be applied throughout the REST
API, unless otherwise specified.
Expand Down Expand Up @@ -685,17 +683,19 @@ should also be passed with a media type value that indicates the format
of the source, such as `application/json`.

[discrete]
==== Content-Type Requirements
==== Content-type requirements

The type of the content sent in a request body must be specified using
the `Content-Type` header. The value of this header must map to one of
the supported formats that the API supports. Most APIs support JSON,
YAML, CBOR, and SMILE. The bulk and multi-search APIs support NDJSON,
JSON, and SMILE; other types will result in an error response.

Additionally, when using the `source` query string parameter, the
content type must be specified using the `source_content_type` query
string parameter.
When using the `source` query string parameter, the content type must be
specified using the `source_content_type` query string parameter.

{es} only supports UTF-8-encoded JSON. {es} ignores any other encoding headings
sent with a request. Responses are also UTF-8 encoded.

[[url-access-control]]
=== URL-based access control
Expand Down