Consume Metabase semantic layer models through the Agent REST API to build a headless analytics application

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

Steps

  1. Ensure your Metabase instance is running a version that includes the Agent API and that you have API key or session token authentication configured
  2. Model your canonical data definitions in Metabase Data Studio as Models (curated saved questions intended as semantic building blocks) with verified column types, descriptions, and relationships
  3. Send POST requests to /api/agent with a natural language query or structured request body; the Agent API resolves the request against the authenticated user's permitted models and semantic definitions
  4. Parse the response to extract the resulting data, the SQL that was generated, and any metadata about which models were used, enabling you to build traceability in your application
  5. Scope the Agent API session to a specific user's permissions by authenticating with that user's session token, so that the semantic layer access control in Metabase governs what data is accessible

Known gotchas

Related routes

Manage Microsoft Sentinel analytics rules programmatically via the REST API
learn.microsoft.com · 5 steps · unrated
Configure AtScale as a universal semantic layer over Snowflake using the Open Semantic Interchange (OSI) standard to expose governed metrics to Power BI and AI agents
www.atscale.com · 5 steps · unrated
Expose Cube semantic layer metrics to an AI agent using the Cube SQL API MEASURE() function
cube.dev · 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