Get a cube definition
GET {{baseUrl}}/api/cubes/:cubeId
Get the definition of a specific cube, including attributes and metrics. The cube can be either an OLAP Cube or a Direct Data Access (DDA)/MDX cube. The in-memory cube definition provides information about all available objects without actually running any data query/report. The results can be used by other requests to help filter large datasets and retrieve values dynamically, helping with performance and scalability. You obtain the authorization token needed to execute the request using POST /auth/login; you obtain the project ID using GET /projects. You pass the authorization token and the project ID in the request header. You specify the cube ID in the path of the request.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
fields | null | Comma-separated, top-level field whitelist that allows the client to selectively retrieve part of the response model. If specified, extra filtering is applied, and for top-level object (if root model is an array, each array element), only the listed fields are kept in the response. For example, "id,elements" keeps only the "id" field and whole "elements" array field, omitting all other fields in the top-level response model. |
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
X-MSTR-AuthToken | string | (Required) Authorization token | |
X-MSTR-ProjectID | string | (Required) Project ID |
RESPONSES
status: OK
{"id":"0A9EBE87468B751C3663818889B10D73","name":"Scanned Item Cube","result":{"definition":{"availableObjects":{"metrics":[{"name":"End on hand","id":"AFDD701411D5C3D1C000058B4CC5F24F","type":"Metric"},{"name":"Units Received","id":"4C05185811D3E877C000B3B2D86C964F","type":"Metric"}],"attributes":[{"name":"Category","id":"8D679D3711D3E4981000E787EC6DE8A4","type":"Attribute","forms":[{"id":"CCFBE2A5EADB4F50941FB879CCF1721C","name":"DESC","dataType":"Char","baseFormCategory":"DESC","baseFormType":"Text"},{"id":"45C11FA478E745FEA08D781CEA190FE5","name":"ID","dataType":"Real","baseFormCategory":"ID","baseFormType":"Number"}]},{"name":"Subcategory","id":"8D679D4F11D3E4981000E787EC6DE8A4","type":"Attribute","forms":[{"id":"CCFBE2A5EADB4F50941FB879CCF1721C","name":"DESC","dataType":"Char","baseFormCategory":"DESC","baseFormType":"Text"},{"id":"45C11FA478E745FEA08D781CEA190FE5","name":"ID","dataType":"Real","baseFormCategory":"ID","baseFormType":"Number"}]}]}}}}