Introspect a Cube data model and execute a query via the Cube REST API using the /v1/meta and /v1/load endpoints

domain: cube.dev · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Send a GET request to /cubejs-api/v1/meta with your Cube API token in the Authorization header to retrieve the full data model metadata including all cubes, measures, and dimensions
  2. Parse the cubes array in the response to identify the measures and dimensions relevant to your query
  3. Construct a JSON query object with a measures array, optional dimensions array, optional filters, and a timeDimensions block specifying the dimension name and granularity
  4. POST the query object to /cubejs-api/v1/load and handle the 200 response containing a data array of result rows; if a 200 is returned with a load: false flag, poll the same endpoint again after the suggested wait period
  5. Use the /v1/sql endpoint instead of /v1/load if you need to inspect the generated SQL before executing, which is useful for debugging pre-aggregation selection

Known gotchas

Related routes

Expose Cube semantic layer metrics to an AI agent using the Cube SQL API MEASURE() function
cube.dev · 5 steps · unrated
Execute a DAX query against a Power BI semantic model via the executeDaxQueries REST API endpoint and process the Apache Arrow response
learn.microsoft.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans