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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.