Skip to main content

Loading Data

Deprecated

The Cube API is deprecated, and the REST API should be used instead.

This is how you can retrieve the data for a given query.

Request

🚀 GET

BASE_URL/cube/v1/load

Request

Headers

  • Authorization Token returned by authentication process
{
"dimensions": ["Students.id", "Students.firstname", "Students.lastname"],
"measures": [],
"segments": [],
"timeDimensions": [
{
"dimension": "Students.createdAt",
"dateRange": ["2024-01-01", "2024-12-01"],
"granularity": null,
}
],
}

Responses

200 Successful
{
// The query passed in requests params
"query": {
"dimensions": ["Students.id", "Students.firstname", "Students.lastname"],
"measures": [],
"segments": [],
"timeDimensions": [
{
"dimension": "Students.createdAt",
"dateRange": ["2024-01-01", "2024-12-01"],
"granularity": null,
}
],
},
// Formatted dataset of query results
"data": [
{
"Students.id": "1",
"Students.firstname": "Billie",
"Students.lastname": "Eyelash",
},
{
"Students.id": "2",
"Students.firstname": "Denzel",
"Students.lastname": "Oregon",
},
{
"Students.id": "3",
"Students.firstname": "Vin",
"Students.lastname": "Petrol",
},
...
],
// Metadata for query
"annotation": {
"dimensions": {
"Students.id": {
"title": "Students Id",
"shortTitle": "Id",
"type": "number",
},
"Students.firstname": {
"title": "Students Firstname",
"shortTitle": "Firstname",
"type": "string",
},
"Students.lastname": {
"title": "Students Lastname",
"shortTitle": "Lastname",
"type": "string",
},
},
"measures": {},
"segments": {},
}
}
400 Bad Request Invalid query
{
"error": "'foo' not found for path 'Students.foo'",
}
401 Forbidden Missing or invalid authentication token
{
"error": "Unauthorized",
}

Cube REST API