Update a user hierarchy
PATCH {{baseUrl}}/api/model/hierarchies/:hierarchyId
Updates a specific user hierarchy in the changeset, based on the definition provided in the request body. It returns the hierarchy's updated definition in the changeset. The Modeling server performs a full validation for each part of the body. If the definition is incorrect, an error is reported. For a normal user hierarchy, you can update the following fields: name, subType, attributes, and relationships. To change the user hierarchy subtype, update the UseAsDrillHierarchy field. For attributes, you can update filters and elementDisplayOption. If elementDisplayOption is set to limited_elements, you can also update the limit. 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. To save the change in the metadata, commit using the changeset 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": "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"
}
}
]
} |