Skip to main content
POST
/
v1
/
load
JSON query
curl --request POST \
  --url https://{deployment}.{region}.cubecloudapp.dev/cubejs-api/v1/load \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "queryType": "<string>",
  "query": {
    "measures": [
      "<string>"
    ],
    "dimensions": [
      "<string>"
    ],
    "segments": [
      "<string>"
    ],
    "timeDimensions": [
      {
        "dimension": "<string>",
        "granularity": "<string>",
        "dateRange": {}
      }
    ],
    "order": [
      [
        "<string>"
      ]
    ],
    "limit": 123,
    "offset": 123,
    "filters": [
      {
        "member": "<string>",
        "operator": "<string>",
        "values": [
          "<string>"
        ]
      }
    ],
    "ungrouped": true,
    "subqueryJoins": [
      {
        "sql": "<string>",
        "on": "<string>",
        "joinType": "<string>",
        "alias": "<string>"
      }
    ],
    "joinHints": [
      [
        "<string>"
      ]
    ],
    "timezone": "<string>"
  }
}
'
{
  "results": [
    {
      "annotation": {
        "measures": {},
        "dimensions": {},
        "segments": {},
        "timeDimensions": {}
      },
      "data": [
        {}
      ],
      "dataSource": "<string>",
      "refreshKeyValues": [
        {}
      ],
      "lastRefreshTime": "<string>"
    }
  ],
  "pivotQuery": {},
  "slowQuery": true,
  "queryType": "<string>"
}

Authorizations

Authorization
string
header
required

Cube API token (a JWT). Sent directly in the Authorization header, e.g. Authorization: <CUBE_API_TOKEN> (no "Bearer" prefix).

Body

application/json
queryType
string
cache
enum<string>
Available options:
stale-if-slow,
stale-while-revalidate,
must-revalidate,
no-cache
query
object

Response

successful operation

results
object[]
required
pivotQuery
object
slowQuery
boolean
queryType
string