Logo
MicroStrategy REST API API Documentation

Read a user hierarchy

GET {{baseUrl}}/api/model/hierarchies/:hierarchyId

The response returns the definition of a user hierarchy.

The project ID is required to return a user hierarchy's definition in metadata. The changeset ID is required to return a user hierarchy's definition within a specific changeset. To execute the request, provide either the project ID or changeset ID. If both are provided, only the changeset ID is used.

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

 

Body PARAM

Key Datatype Required Description 



HEADERS

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




RESPONSES

status OK

{ "information": { "versionId": "EA124429B4C146CE9548C4886FCE910D", "primaryLocale": "en-US", "objectId": "C3919FA1F82F466E9C0BD15A4A2C9E79", "subType": "dimension_user", "name": "Time_New", "destinationFolderId": "98FE182C2A10427EACE0CD30B6768258" }, "useAsDrillHierarchy": true, "attributes": [ { "objectId": "8D679D4411D3E4981000E787EC6DE8A4", "name": "Month", "entryPoint": true, "elementDisplayOption": "all_elements" }, { "objectId": "8D679D4511D3E4981000E787EC6DE8A4", "name": "Month of Year", "entryPoint": true, "elementDisplayOption": "all_elements" } ], "relationships": [ { "parent": { "objectId": "8D679D4511D3E4981000E787EC6DE8A4", "subType": "attribute", "name": "Month of Year" }, "child": { "objectId": "8D679D4411D3E4981000E787EC6DE8A4", "subType": "attribute", "name": "Month" } } ] }

Curl
curl -X GET 'baseUrl/api/model/hierarchies/:hierarchyId' -H 'X-MSTR-AuthToken: authToken' -H 'X-MSTR-ProjectID: projectId' -H 'X-MSTR-MS-Changeset: rd_changesetId'

ENDPOINTS