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:
- 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:
- Then, type the SQL ...