Type to search.

Translate SQL into Elasticsearch queries

  • POST also GET /_sql/translate
Auth

Translate an SQL search into a search API request containing Query DSL. It accepts the same request body parameters as the SQL search API, excluding cursor.

Required privileges

Index privileges read

Request body

fetch_size number · default: 1000

The maximum number of rows (or entries) to return in one response.

filter {} Query · default: none

The Elasticsearch query DSL for additional filtering.

query string required

The SQL query to run.

time_zone string · default: Z

The ISO-8601 time zone ID for the search.

Response

application/json
aggregations map string to {} Aggregation
size number
_source union oneOf
One of:
query {} Query
track_total_hits boolean | number