For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
LoginBook a Demo
  • Getting Started
    • Athena SDK Quickstart
  • Database API
    • Database Filters & CRUD
  • Python Guides
    • Build with Agents
    • Use Models Directly
    • Load Data Frames
    • Upload Files
    • Create Assets
    • Structured Output
    • Long-Running AOP Execution
  • TypeScript Guides
    • Build with Agents
    • Working with Assets
    • Use Models Directly
    • Execute AOPs
    • Sheets API
    • Browser JavaScript (ESM)
    • UI Registry (Assistant.js)
    • Upload Files
    • Create Assets
    • Structured Output
  • API Reference
      • POSTGenerate Cube API Token
      • GETGet Semantic Model Metadata
      • POSTQuery Semantic Model
Logo
LoginBook a Demo
API ReferenceSemantic Model

Query Semantic Model

Beta
POST
https://api.athenaintel.com/api/v0/semantic-model/:asset_id/query
POST
/api/v0/semantic-model/:asset_id/query
$curl -X POST https://api.athenaintel.com/api/v0/semantic-model/asset_id/query \
> -H "X-API-KEY: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "measures": [
> "string"
> ]
>}'
1{
2 "data": [
3 {}
4 ],
5 "row_count": 1
6}
Execute a metric query against a semantic model. Specify measures, optional dimensions, filters, and time dimensions. Returns structured data rows.
Was this page helpful?
Previous

Batch Stop Thread Executions

Next
Built with

Authentication

X-API-KEYstring
API Key authentication via header
OR
AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Path parameters

asset_idstringRequired

Request

This endpoint expects an object.
measureslist of stringsRequired

List of measure identifiers, e.g. [“orders.total_revenue”]

dimensionslist of strings or nullOptional
Optional dimension identifiers for grouping
filterslist of maps from strings to any or nullOptional
Optional filters
limitintegerOptional1-5000Defaults to 100
Maximum rows to return
time_dimensionslist of maps from strings to any or nullOptional
Optional time dimension configs

Response

Successful Response
datalist of maps from strings to any
Query result rows
row_countinteger
Number of rows returned

Errors

401
Unauthorized Error
404
Not Found Error
422
Unprocessable Entity Error
502
Bad Gateway Error