Logo
MicroStrategy REST API API Documentation

Update a consolidation

PUT {{baseUrl}}/api/model/consolidations/:consolidationId

This API replaces the detailed definition of the specified consolidation in the changeset.

A changeset ID is required to execute the request, and it can be obtained using the changeset creation API. An authorization token is required to execute the request and can be obtained using Authentication endpoints.

To replace the consolidation's definition in metadata, commit using the POST /model/{changesetId}/commit API.

 

Body PARAM

Key Datatype Required Description 



HEADERS

Key Datatype Required Description 
X-MSTR-AuthToken
string (Required) Authorization Token
X-MSTR-MS-Changeset
string (Required) Changeset ID
Content-Type
string




RESPONSES

status OK

{ "information": { "versionId": "701DE5C5DA674F0992AC2C02F2C93482", "primaryLocale": "en-US", "objectId": "B0247DD045D647FDAA2511507B3C685B", "subType": "consolidation", "name": "New Consolidation2", "destinationFolderId": "98FE182C2A10427EACE0CD30B6768258" }, "drillMap": { "objectId": "431367544A6C1EC401599989093E375C", "subType": "drill_map", "name": "Category Sales Report prompted on Category Item Drill Map" }, "elements": [ { "id": "DC0FE9F6C8854B2D9027660F90C1264B", "name": "element1", "type": "calculation", "format": { "header": [], "values": [] }, "expression": { "text": "1", "tree": { "type": "constant", "variant": { "type": "double", "value": "1.0" } } } } ], "subtotal": "enable" }

Curl
curl -X PUT 'baseUrl/api/model/consolidations/:consolidationId' -H 'X-MSTR-AuthToken: authToken' -H 'X-MSTR-MS-Changeset: rd_changesetId' -H 'Content-Type: application/json' -d '{"information":{"name":"New Consolidation2","destinationFolderId":"publicObjectsFolderId","subType":"consolidation"},"drillMap":{"objectId":"431367544A6C1EC401599989093E375C"},"elements":[{"name":"element1","type":"calculation","expression":{"tree":{"type":"constant","variant":{"type":"double","value":1}}}}],"subtotal":"enable"}'

ENDPOINTS