Logo
MicroStrategy REST API API Documentation

Read relationship(s) of an attribute

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

The response returns the relationships of a single attribute as a set of tuples (pairs of related attributes) with their relationship type (1-N, 1-1, etc.) and corresponding relationship table.

The project ID is required to return an attribute's relationship(s) in metadata. The changeset ID is required to return an attribute's relationship within a specific changeset. To execute the request, provide either 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 authentication 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

{ "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": "8D679D4A11D
Curl
curl -X GET 'baseUrl/api/model/systemHierarchy/attributes/:attributeId/relationships' -H 'X-MSTR-AuthToken: authToken' -H 'X-MSTR-ProjectID: projectId' -H 'X-MSTR-MS-Changeset: rd_changesetId'

ENDPOINTS