Logo
MicroStrategy REST API API Documentation

Update relationship(s) of an attribute

PUT {{baseUrl}}/api/model/systemHierarchy/attributes/:attributeId/relationships

Update a specific attribute's relationship(s) in the changeset, based on the definition provided in the request body. It returns the attribute's updated relationship(s) in the changeset.

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 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

{ "relationships": [ { "parent": { "objectId": "8D679D4411D3E4981000E787EC6DE8A4", "subType": "attribute", "name": "Month" }, "child": { "objectId": "96ED3EC811D5B117C000E78A4CC5F24F", "subType": "attribute", "name": "Day" }, "relationshipTable": { "objectId": "24C30AD611D5AEC9C000E38A4CC5F24F", "subType": "logical_table", "name": "LU_DAY" }, "relationshipType": "one_to_many" }, { "parent": { "objectId": "8D679D4511D3E4981000E787EC6DE8A4", "subType": "attribute", "name": "Month of Year" }, "child": { "objectId": "8D679D4411D3E4981000E787EC6DE8A4", "subType": "attribute", "name": "Month" }, "relationshipTable": { "objectId": "8D67938011D3E4981000E787EC6DE8A4", "subType": "logical_table", "name": "LU_MONTH" }, "relationshipType": "one_to_many" }, { "parent": { "objectId": "8D679D4A11D3E4981000E787EC6DE8A4", "subType": "attribute", "name": "Quarter" }, "child": { "objectId": "8D67
Curl
curl -X PUT 'baseUrl/api/model/systemHierarchy/attributes/:attributeId/relationships' -H 'X-MSTR-AuthToken: authToken' -H 'X-MSTR-MS-Changeset: rd_changesetId' -H 'Content-Type: application/json' -d '{"relationships":[{"parent":{"objectId":"8D679D4411D3E4981000E787EC6DE8A4","subType":"attribute","name":"Month"},"child":{"objectId":"96ED3EC811D5B117C000E78A4CC5F24F","subType":"attribute","name":"Day"},"relationshipTable":{"objectId":"24C30AD611D5AEC9C000E38A4CC5F24F","subType":"logical_table","name":"LU_DAY"},"relationshipType":"one_to_many"},{"parent":{"objectId":"8D679D4511D3E4981000E787EC6DE8A4","subType":"attribute","name":"Month of Year"},"child":{"objectId":"8D679D4411D3E4981000E787EC6DE8A4","subType":"attribute","name":"Month"},"relationshipTable":{"objectId":"8D67938011D3E4981000E787EC6DE8A4","subType":"logical_table","name":"LU_MONTH"},"relationshipType":"one_to_many"},{"parent":{"objectId":"8D679D4A11D3E4981000E787EC6DE8A4","subType":"attribute","name":"Quarter"},"child":{"objectId":"8D679D4411D3E4981000E787EC6DE8A4","subType":"attribute","name":"Month"},"relationshipTable":{"objectId":"8D67938011D3E4981000E787EC6DE8A4","subType":"logical_table","name":"LU_MONTH"},"relationshipType":"one_to_many"}]}'

ENDPOINTS