Elasticsearch SQL REST API

The SQL REST API accepts a SQL statement in JSON format, executes it, and returns a response. The endpoint of the SQL REST API is shown in the following code block. You should use a parameter query with a SQL statement in the request body:

POST /_sql?format=response_format{   "query": "....",    "parameter_x": parameter_x_value}

Now, let's use the Kibana console to practice some examples outlined under the Query DSL section of Chapter 6, Search APIs:

  1. To use the Kibana console from dev_tools, click on the button with the wrench icon on the left-hand sidebar, as shown in the following screenshot:

  1. Then, type the SQL ...

Get Advanced Elasticsearch 7.0 now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.