Skip to content
DataHashi Docs

REST API & authentication

datahashi is split into two APIs, at two hosts, with two different credentials.

Manages your workspace itself: sign-in, org/workspace membership, connections, semantic models, and API keys. This is what the console talks to, and what you’d script against to automate workspace setup (provisioning a connection or minting a key in CI, say).

The control plane serves its own interactive reference — browse and try every endpoint at api.datahashi.com/docs, backed by the machine-readable spec at api.datahashi.com/openapi.yaml.

Authenticate to the control plane with your normal workspace session (the console handles this) or a control-plane token, depending on which endpoint you’re calling — the Swagger UI above documents each endpoint’s specific requirement.

Endpoints you’ll use most when scripting setup:

EndpointWhat it does
POST /v1/orgs/{orgId}/api-keysMint a data-plane API key (mode: governed | explore). Shown once.
GET /v1/orgs/{orgId}/api-keysList your keys by id/prefix/mode/label — never the secret.
Revoke / rotate a keyInvalidate a leaked key, or replace it without downtime for your other keys.

Where queries actually run. This is the host every guide on this site queries against:

EndpointMethodWhat it does
/v1/queryPOSTRun a Semantic Query — see Query the API.
/v1/drill-downPOSTExpand one aggregated cell into its underlying rows.
/v1/modelsGETList your workspace’s semantic model names.
/v1/catalogGETOne model’s metrics, dimensions, curated views, and (explore mode) measures.
/v1/describeGETLook up one metric, dimension, or measure by name.
/mcpThe same surface over MCP (Streamable HTTP) — see Use with an LLM agent.

Authenticate with the API key you minted on the control plane, as a bearer token:

Authorization: Bearer <your-api-key>

The key’s claims are identity only — your workspace and mode. The warehouse a query reaches, its row-level security, and its cost limits are all resolved server-side from that identity; there is no field on any data-plane request that can widen them.

Every data-plane error is {"error": {"code", "message"}}, using one of seven stable codes: bad_request, unauthenticated, forbidden, not_found, over_budget, overloaded, internal. See Query the API for the HTTP-status mapping.

A method/path mismatch (calling /v1/query with GET, say) is answered by the router directly — a plain-text 404/405, not this JSON envelope.