11[[api-conventions]]
2- = API conventions
2+ == API conventions
33
44The *Elasticsearch* REST APIs are exposed using <<modules-http,JSON over HTTP>>.
55
@@ -12,7 +12,7 @@ API, unless otherwise specified.
1212* <<url-access-control>>
1313
1414[[multi-index]]
15- == Multiple Indices
15+ === Multiple Indices
1616
1717Most APIs that refer to an `index` parameter support execution across multiple indices,
1818using simple `test1,test2,test3` notation (or `_all` for all indices). It also
@@ -55,7 +55,7 @@ NOTE: Single index APIs such as the <<docs>> and the
5555<<indices-aliases,single-index `alias` APIs>> do not support multiple indices.
5656
5757[[date-math-index-names]]
58- == Date math support in index names
58+ === Date math support in index names
5959
6060Date math index name resolution enables you to search a range of time-series indices, rather
6161than searching all of your time-series indices and filtering the results or maintaining aliases.
@@ -164,12 +164,12 @@ GET /%3Clogstash-%7Bnow%2Fd-2d%7D%3E%2C%3Clogstash-%7Bnow%2Fd-1d%7D%3E%2C%3Clogs
164164// TEST[s/now/2016.09.20||/]
165165
166166[[common-options]]
167- == Common options
167+ === Common options
168168
169169The following options can be applied to all of the REST APIs.
170170
171171[float]
172- === Pretty Results
172+ ==== Pretty Results
173173
174174When appending `?pretty=true` to any request made, the JSON returned
175175will be pretty formatted (use it for debugging only!). Another option is
@@ -178,7 +178,7 @@ to set `?format=yaml` which will cause the result to be returned in the
178178
179179
180180[float]
181- === Human readable output
181+ ==== Human readable output
182182
183183Statistics are returned in a format suitable for humans
184184(e.g. `"exists_time": "1h"` or `"size": "1kb"`) and for computers
@@ -191,7 +191,7 @@ consumption. The default for the `human` flag is
191191
192192[[date-math]]
193193[float]
194- === Date Math
194+ ==== Date Math
195195
196196Most parameters which accept a formatted date value -- such as `gt` and `lt`
197197in <<query-dsl-range-query,`range` queries>>, or `from` and `to`
@@ -229,7 +229,7 @@ Assuming `now` is `2001-01-01 12:00:00`, some examples are:
229229
230230[float]
231231[[common-options-response-filtering]]
232- === Response Filtering
232+ ==== Response Filtering
233233
234234All REST APIs accept a `filter_path` parameter that can be used to reduce
235235the response returned by Elasticsearch. This parameter takes a comma
@@ -396,7 +396,7 @@ GET /_search?filter_path=hits.hits._source&_source=title&sort=rating:desc
396396
397397
398398[float]
399- === Flat Settings
399+ ==== Flat Settings
400400
401401The `flat_settings` flag affects rendering of the lists of settings. When the
402402`flat_settings` flag is `true`, settings are returned in a flat format:
@@ -467,27 +467,27 @@ Returns:
467467By default `flat_settings` is set to `false`.
468468
469469[float]
470- === Parameters
470+ ==== Parameters
471471
472472Rest parameters (when using HTTP, map to HTTP URL parameters) follow the
473473convention of using underscore casing.
474474
475475[float]
476- === Boolean Values
476+ ==== Boolean Values
477477
478478All REST API parameters (both request parameters and JSON body) support
479479providing boolean "false" as the value `false` and boolean "true" as the
480480value `true`. All other values will raise an error.
481481
482482[float]
483- === Number Values
483+ ==== Number Values
484484
485485All REST APIs support providing numbered parameters as `string` on top
486486of supporting the native JSON number types.
487487
488488[[time-units]]
489489[float]
490- === Time units
490+ ==== Time units
491491
492492Whenever durations need to be specified, e.g. for a `timeout` parameter, the duration must specify
493493the unit, like `2d` for 2 days. The supported units are:
@@ -503,7 +503,7 @@ the unit, like `2d` for 2 days. The supported units are:
503503
504504[[byte-units]]
505505[float]
506- === Byte size units
506+ ==== Byte size units
507507
508508Whenever the byte size of data needs to be specified, e.g. when setting a buffer size
509509parameter, the value must specify the unit, like `10kb` for 10 kilobytes. Note that
@@ -519,7 +519,7 @@ these units use powers of 1024, so `1kb` means 1024 bytes. The supported units a
519519
520520[[size-units]]
521521[float]
522- === Unit-less quantities
522+ ==== Unit-less quantities
523523
524524Unit-less quantities means that they don't have a "unit" like "bytes" or "Hertz" or "meter" or "long tonne".
525525
@@ -535,7 +535,7 @@ when we mean 87 though. These are the supported multipliers:
535535
536536[[distance-units]]
537537[float]
538- === Distance Units
538+ ==== Distance Units
539539
540540Wherever distances need to be specified, such as the `distance` parameter in
541541the <<query-dsl-geo-distance-query>>), the default unit is meters if none is specified.
@@ -557,7 +557,7 @@ Nautical mile:: `NM`, `nmi`, or `nauticalmiles`
557557
558558[[fuzziness]]
559559[float]
560- === Fuzziness
560+ ==== Fuzziness
561561
562562Some queries and APIs support parameters to allow inexact _fuzzy_ matching,
563563using the `fuzziness` parameter.
@@ -590,7 +590,7 @@ the default values are 3 and 6, equivalent to `AUTO:3,6` that make for lengths:
590590
591591[float]
592592[[common-options-error-options]]
593- === Enabling stack traces
593+ ==== Enabling stack traces
594594
595595By default when a request returns an error Elasticsearch doesn't include the
596596stack trace of the error. You can enable that behavior by setting the
@@ -668,7 +668,7 @@ The response looks like:
668668// TESTRESPONSE[s/"stack_trace": "java.lang.Number.+\.\.\."/"stack_trace": $body.error.caused_by.stack_trace/]
669669
670670[float]
671- === Request body in query string
671+ ==== Request body in query string
672672
673673For libraries that don't accept a request body for non-POST requests,
674674you can pass the request body as the `source` query string parameter
@@ -677,7 +677,7 @@ should also be passed with a media type value that indicates the format
677677of the source, such as `application/json`.
678678
679679[float]
680- === Content-Type Requirements
680+ ==== Content-Type Requirements
681681
682682The type of the content sent in a request body must be specified using
683683the `Content-Type` header. The value of this header must map to one of
@@ -690,7 +690,7 @@ content type must be specified using the `source_content_type` query
690690string parameter.
691691
692692[[url-access-control]]
693- == URL-based access control
693+ === URL-based access control
694694
695695Many users use a proxy with URL-based access control to secure access to
696696Elasticsearch indices. For <<search-multi-search,multi-search>>,
0 commit comments