Skip to main content
The HTTP REST v2 API is a language-agnostic, firewall-friendly way to run SQL on e6data over HTTPS. It’s a two-step flow: authenticate once for a short-lived session token, then submit statements and read results. Submission is asynchronous - you get a statement_id, poll for completion, then fetch result chunks.
The endpoint requires HTTP/2. Use an HTTP/2-capable client and don’t force curl’s --http2 flag - ALPN negotiates HTTP/2 automatically.

Authenticate

Exchange your email and a personal access token for a session token. Tokens are opaque strings starting with e6pat_ (PATs) or e6sa_ (service account keys) - treat them like passwords.
You can also send a token directly as Authorization: Bearer <token>, or use an SSO/OIDC JWT as a bearer token.

Submit a statement

Required headers: cluster-name: <CLUSTER>, Content-Type: application/json, and Authorization: Bearer <session>.

Poll and fetch results

Reuse session_id via the X-Session-Id header to skip re-authentication while polling and paging:

Endpoints

Statement states: PENDING → RUNNING → SUCCEEDED (or FAILED / CANCELLED).

Python example

Use httpx (not requests) since the endpoint requires HTTP/2 - pip install "httpx[http2]":

Operational notes

  • Reuse sessions via X-Session-Id while polling and paging to avoid re-authenticating.
  • Page large results with result/chunks/{n}, and call clearOrCancel when finished to free cluster resources promptly.
  • Suspended clusters auto-resume on the first statement; the request waits (~30–90 s).
  • Use POST /api/v2/sql/statements (v2) - not the older /api/v1/query path.

See also

Last modified on September 29, 2026