Logo
MicroStrategy REST API API Documentation

Get a report definition

GET {{baseUrl}}/api/v2/reports/:reportId

Get the definition of a specific report, including attributes and metrics. This in-memory report 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 report ID in the path of the request.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
X-MSTR-AuthToken
string (Required) Authorization token
X-MSTR-ProjectID
string (Required) Project ID




RESPONSES

status OK

{ "name": "Monthly Sales vs LM & LY (1:1 transformations)", "id": "020E95484AE99C908F11A9ADCA0AFFB0", "definition": { "grid": { "crossTab": false, "metricsPosition": { "axis": "columns", "index": 0 }, "rows": [ { "name": "Quarter", "id": "8D679D4A11D3E4981000E787EC6DE8A4", "type": "attribute", "forms": [ { "id": "CCFBE2A5EADB4F50941FB879CCF1721C", "name": "DESC", "dataType": "varChar", "baseFormCategory": "DESC", "baseFormType": "text" } ] }, { "name": "Month", "id": "8D679D4411D3E4981000E787EC6DE8A4", "type": "attribute", "forms": [ { "id": "CCFBE2A5EADB4F50941FB879CCF1721C", "name": "DESC", "dataType": "varChar", "baseFormCategory": "DESC", "baseFormType": "text" } ] } ], "columns": [ { "name": "Metrics", "id": "00000000000000000000000000000000", "type": "templateMetrics", "elements": [ { "name": "Revenue", "id": "4C05177011D3E877C000B3B2D86C964F", "type": "metric", "dataType": "unknown" }, { "name": "Last Month's Revenue", "id": "4C05198411D3E877C000B3B2D86C964F", "type": "metric", "dataType": "unknown"
Curl
curl -X GET 'baseUrl/api/v2/reports/:reportId' -H 'X-MSTR-AuthToken: authToken' -H 'X-MSTR-ProjectID: projectId'

ENDPOINTS