Elastic Stack (ELK Stack) Sql API

The sql API from Elastic Stack (ELK Stack) — 6 operation(s) for sql.

Operations 8

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

POST /_sql/close Close an SQL search cursor · Clear an SQL search cursor #
Ask an LLM
“How do I release an SQL pagination cursor I'm done with?”
“Can I free the resources held by an open SQL cursor before it expires?”
Tell an agent
Close SQL cursor {cursor}.
Clear the SQL search cursor {cursor} so it stops holding resources.
DELETE /_sql/async/delete/{id} Delete or cancel an async SQL search · Delete an async SQL search #
Ask an LLM
“How do I cancel an async SQL search that is still running?”
“Can I delete the stored results of an async SQL query once I've read them?”
Tell an agent destructive · confirm first
Delete async SQL search {id}.
Cancel the running SQL search {id} and discard its results.
GET /_sql/async/{id} Get results of an async SQL search · Get async SQL search results #
Ask an LLM
“How do I fetch the results of an async SQL query I started earlier?”
“Can I get async SQL results back as CSV instead of JSON?”
Tell an agent
Get the results of async SQL search {id}.
Return async SQL search {id} results in {format} format.
GET /_sql/async/status/{id} Check the status of an async SQL search · Get the async SQL search status #
Ask an LLM
“Is my async SQL search still running or has it completed?”
“How can I check an async SQL search's progress without downloading its results?”
Tell an agent
Check the status of async SQL search {id}.
Tell me whether SQL search {id} is still running.
GET /_sql Run an SQL query with a GET request · Get SQL search results #
Ask an LLM
“Can I send an SQL query to Elasticsearch using a GET request with a body?”
“Which output formats does a GET SQL query support?”
Tell an agent
Using GET, run the SQL query {query}.
Send a GET request running {query} and return {fetch_size} rows per page.
POST /_sql Run an SQL query against Elasticsearch · Get SQL search results #
Ask an LLM
“How do I query my Elasticsearch indices with SQL?”
“Can I page through large SQL results with a cursor?”
Tell an agent
Run the SQL query {query}.
Execute {query} in time zone {time_zone} and return the results as {format}.
GET /_sql/translate Translate SQL into Query DSL via GET · Translate SQL into Elasticsearch queries #
Ask an LLM
“Can I use a GET request to see the Query DSL that an SQL statement becomes?”
“Does the GET translate endpoint accept a filter alongside the SQL?”
Tell an agent
With a GET request, translate {query} into Query DSL.
Via GET, show the search request generated for SQL {query}.
POST /_sql/translate Translate SQL into Elasticsearch Query DSL · Translate SQL into Elasticsearch queries #
Ask an LLM
“How do I convert an SQL statement into the equivalent Elasticsearch search request?”
“What Query DSL does my SQL WHERE clause produce?”
Tell an agent
Translate the SQL {query} into an Elasticsearch search request.
Convert SQL {query} to Query DSL using time zone {time_zone}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/elk-stack:elk-stack-sql-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

elk-stack-sql-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Elasticsearch Request & Response Specification Sql API
  license:
    name: Apache 2.0
    url: https://github.com/elastic/elasticsearch-specification/blob/main/LICENSE
  version: ''
tags:


# --- truncated at 32 KB (344 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/elk-stack/refs/heads/main/openapi/elk-stack-sql-api-openapi.yml