Skip to content

Commit df85eee

Browse files
author
zhe
committed
Update
1 parent 7805245 commit df85eee

19 files changed

+2409
-0
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
title: Manage data model attribute objects
3+
description: You can use REST API requests to retrieve an attribute's elements in data model.
4+
---
5+
6+
<Available since="Strategy ONE (August 2025)" />
7+
8+
:::tip
9+
10+
You can try these workflows with [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).
11+
12+
Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).
13+
14+
:::
15+
16+
You can use REST API requests to retrieve an attribute's elements in data model:
17+
18+
- [Retrieve an Attribute's Elements in Data Model](retrieve-an-attributes-elements-in-data-model.md)
19+
20+
For more information about the Modeling service, see [Configuring the Modeling Service](https://www2.microstrategy.com/producthelp/Current/InstallConfig/en-us/Content/modeling_service.htm).
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
---
2+
title: Retrieve an attribute's elements in data model
3+
sidebar_label: Retrieve an attribute's elements in data model
4+
description: This workflow sample demonstrates how to retrieve an attribute's elements in data model.
5+
---
6+
7+
<Available since="Strategy ONE (August 2025)" />
8+
9+
:::tip
10+
11+
You can try these workflows with [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).
12+
13+
Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).
14+
15+
:::
16+
17+
This workflow sample demonstrates how to retrieve an attribute's elements in data model.
18+
19+
:::info
20+
21+
Get the authorization token needed to execute the request with [POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).
22+
23+
Get the project ID from [GET /api/projects](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Projects/getProjects_1).
24+
25+
:::
26+
27+
Retrieve the attribute's elements using `GET /api/dataModels/{dataModelId}/attributes/{id}/elements`.
28+
29+
Sample Request Header:
30+
31+
```http
32+
"accept": "application/json"
33+
"X-MSTR-AuthToken": "4bb7n1dhjo860e7tlpchg57hl"
34+
"X-MSTR-ProjectID": "B7CA92F04B9FAE8D941C3E9B7E0CD754"
35+
```
36+
37+
Sample Request Body: Empty
38+
39+
Sample Curl:
40+
41+
```bash
42+
curl -X GET "https://demo.microstrategy.com/MicroStrategyLibrary/api/dataModels/7F071F619BE244C7B6CDC2626EBB1C6C/attributes/8D679D5111D3E4981000E787EC6DE8A4/elements" -H "accept: application/json" -H "X-MSTR-AuthToken: 4bb7n1dhjo860e7tlpchg57hl" -H "X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754"
43+
```
44+
45+
Sample Response Body:
46+
47+
You can view the data model's attribute's elements in the response body.
48+
49+
```json
50+
[
51+
{
52+
"name": "2015",
53+
"id": "h2015;;2015"
54+
},
55+
{
56+
"name": "2016",
57+
"id": "h2016;;2016"
58+
},
59+
{
60+
"name": "2017",
61+
"id": "h2017;;2017"
62+
},
63+
{
64+
"name": "2018",
65+
"id": "h2018;;2018"
66+
}
67+
]
68+
```
69+
70+
Response Code 200: (The attribute's elements is returned successfully.)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
title: Manage data model object acl
3+
description: You can use REST API requests to retrieve and update acl of objects in data model through the Modeling service.
4+
---
5+
6+
<Available since="Strategy ONE (August 2025)" />
7+
8+
:::tip
9+
10+
You can try these workflows with [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).
11+
12+
Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).
13+
14+
:::
15+
16+
You can use REST API requests to retrieve and update acl of objects in data model through the Modeling service.
17+
18+
- [Get ACL of an object in a Data Model](retrieve-a-data-model-object-acl.md)
19+
- [Update ACL of an object in a Data Model](update-a-data-model-object-acl.md)
20+
21+
For more information about the Modeling service, see [Configuring the Modeling Service](https://www2.microstrategy.com/producthelp/Current/InstallConfig/en-us/Content/modeling_service.htm).
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
---
2+
title: Retrieve acl of an object inside a data model
3+
description: You can use REST API requests to retrieve acl of an object inside a data model.
4+
---
5+
6+
<Available since="Strategy ONE (August 2025)" />
7+
8+
:::tip
9+
10+
You can try out this workflow at [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).
11+
12+
Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).
13+
14+
:::
15+
16+
You can use REST APIs to retrieve the acl of an object inside a data model through the Modeling service.
17+
18+
## Retrieve acl of an attribute inside a data model
19+
20+
There is a "Customer Statistics" data model with an "A44F79895E9247719292556AA14373F5" ID. This data model contains a "Customer" attribute with an "B9E7FD5911D3E936C000B3B2D86C964F" ID.
21+
You want to get the acl of the "Customer" attribute.
22+
23+
:::info
24+
25+
To get the authorization token needed to execute the request, use `POST /api/auth/login`.
26+
27+
Get the project ID from `GET /api/projects`.
28+
29+
:::
30+
31+
:::tip
32+
33+
Changesets are used in this workflow. For information on how to create and use changesets, see [Changesets](/docs/common-workflows/modeling/changesets.md).
34+
35+
:::
36+
37+
To get the acl of the object in your data model, use [GET /api/model/dataModels/\{dataModelId}/objects/\{objectId}/acl](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Models/getDataModelObjectAcl).
38+
39+
Sample Request Header
40+
41+
```http
42+
"accept": "application/json"
43+
"X-MSTR-AuthToken": "pisu5dkkutqfblaamdomgr00ch"
44+
"X-MSTR-MS-Changeset": "0E9F01172ECF4BA2BB510F7B9FB4F6E8"
45+
```
46+
47+
Sample Request Body: Empty
48+
49+
Sample Curl:
50+
51+
```bash
52+
curl -X GET "https://demo.microstrategy.com/MicroStrategyLibrary/api/dataModels/A44F79895E9247719292556AA14373F5/objects/B9E7FD5911D3E936C000B3B2D86C964F/acl?subType=attribute" -H "accept: application/json" -H "X-MSTR-AuthToken: pisu5dkkutqfblaamdomgr00ch" -H "X-MSTR-MS-Changeset: 0E9F01172ECF4BA2BB510F7B9FB4F6E8"
53+
```
54+
55+
Sample Response Body:
56+
57+
```json
58+
{
59+
"acl": {
60+
"294DEDC011D2F1D56000D98E67019608": {
61+
"granted": 255,
62+
"denied": 0,
63+
"inheritable": false,
64+
"name": "Public / Guest",
65+
"subType": "user_group"
66+
},
67+
"C82C6B1011D2894CC0009D9F29718E4F": {
68+
"granted": 45,
69+
"denied": 16,
70+
"inheritable": false,
71+
"name": "Everyone",
72+
"subType": "user_group"
73+
},
74+
"D5ABCBF54937420EC3377FA23857A4DC": {
75+
"granted": 255,
76+
"denied": 0,
77+
"inheritable": false,
78+
"name": "F40308_automodel",
79+
"subType": "user"
80+
}
81+
}
82+
}
83+
```
84+
85+
Response Code: 200
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
---
2+
title: Update acl of an object inside a data model
3+
description: You can use REST API requests to update acl of an object inside a data model.
4+
---
5+
6+
<Available since="Strategy ONE (August 2025)" />
7+
8+
:::tip
9+
10+
You can try out this workflow at [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).
11+
12+
Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).
13+
14+
:::
15+
16+
You can use REST APIs to update the acl of an object inside a data model through the Modeling service.
17+
18+
## Update acl of a metric inside a data model
19+
20+
There is a "Customer Statistics" data model with an "A44F79895E9247719292556AA14373F5" ID. This data model contains a "Sales" metric with an "B9E7FD5911D3E936C000B3B2D86C964F" ID.
21+
You want to update the acl of the "Sales" metric.
22+
23+
:::info
24+
25+
To get the authorization token needed to execute the request, use `POST /api/auth/login`.
26+
27+
Get the project ID from `GET /api/projects`.
28+
29+
:::
30+
31+
:::tip
32+
33+
Changesets are used in this workflow. For information on how to create and use changesets, see [Changesets](/docs/common-workflows/modeling/changesets.md).
34+
35+
:::
36+
37+
To update the acl of the object in your data model, use [PATCH /api/model/dataModels/\{dataModelId}/objects/\{objectId}/acl](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Models/updateDataModelObjectAcl).
38+
39+
Sample Request Header
40+
41+
```http
42+
"accept": "application/json"
43+
"X-MSTR-AuthToken": "pisu5dkkutqfblaamdomgr00ch"
44+
"X-MSTR-MS-Changeset": "0E9F01172ECF4BA2BB510F7B9FB4F6E8"
45+
```
46+
47+
Sample Request Body:
48+
49+
```json
50+
{
51+
"acl": {
52+
"294DEDC011D2F1D56000D98E67019608": {
53+
"granted": 255,
54+
"denied": 0,
55+
"inheritable": false,
56+
"name": "Public / Guest",
57+
"subType": "user_group"
58+
},
59+
"C82C6B1011D2894CC0009D9F29718E4F": {
60+
"granted": 45,
61+
"denied": 16,
62+
"inheritable": false,
63+
"name": "Everyone",
64+
"subType": "user_group"
65+
},
66+
"D5ABCBF54937420EC3377FA23857A4DC": {
67+
"granted": 255,
68+
"denied": 0,
69+
"inheritable": false,
70+
"name": "F40308_automodel",
71+
"subType": "user"
72+
}
73+
}
74+
}
75+
```
76+
77+
Sample Curl:
78+
79+
```bash
80+
curl -X PATCH "https://demo.microstrategy.com/MicroStrategyLibrary/api/dataModels/A44F79895E9247719292556AA14373F5/objects/B9E7FD5911D3E936C000B3B2D86C964F/acl?subType=metric" -H "accept: application/json" -H "X-MSTR-AuthToken: pisu5dkkutqfblaamdomgr00ch" -H "X-MSTR-MS-Changeset: 0E9F01172ECF4BA2BB510F7B9FB4F6E8" -d '{"acl":{"294DEDC011D2F1D56000D98E67019608":{"granted":255,"denied":0,"inheritable":false,"name":"Public / Guest","subType":"user_group"},"C82C6B1011D2894CC0009D9F29718E4F":{"granted":45,"denied":16,"inheritable":false,"name":"Everyone","subType":"user_group"},"D5ABCBF54937420EC3377FA23857A4DC":{"granted":255,"denied":0,"inheritable":false,"name":"F40308_automodel","subType":"user"}}}'
81+
```
82+
83+
Sample Response Body:
84+
85+
```json
86+
{
87+
"acl": {
88+
"294DEDC011D2F1D56000D98E67019608": {
89+
"granted": 255,
90+
"denied": 0,
91+
"inheritable": false,
92+
"name": "Public / Guest",
93+
"subType": "user_group"
94+
},
95+
"C82C6B1011D2894CC0009D9F29718E4F": {
96+
"granted": 45,
97+
"denied": 16,
98+
"inheritable": false,
99+
"name": "Everyone",
100+
"subType": "user_group"
101+
},
102+
"D5ABCBF54937420EC3377FA23857A4DC": {
103+
"granted": 255,
104+
"denied": 0,
105+
"inheritable": false,
106+
"name": "F40308_automodel",
107+
"subType": "user"
108+
}
109+
}
110+
}
111+
```
112+
113+
Response Code: 200

0 commit comments

Comments
 (0)