Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
title: Manage data model attribute objects
description: You can use REST API requests to retrieve an attribute's elements in data model.
---

<Available since="Strategy ONE (August 2025)" />

:::tip

You can try these workflows with [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).

Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).

:::

You can use REST API requests to retrieve an attribute's elements in data model:

- [Retrieve an Attribute's Elements in Data Model](retrieve-an-attributes-elements-in-data-model.md)

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).
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
---
title: Retrieve an attribute's elements in data model
sidebar_label: Retrieve an attribute's elements in data model
description: This workflow sample demonstrates how to retrieve an attribute's elements in data model.
---

<Available since="Strategy ONE (August 2025)" />

:::tip

You can try these workflows with [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).

Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).

:::

This workflow sample demonstrates how to retrieve an attribute's elements in data model.

:::info

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

Get the project ID from [GET /api/projects](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Projects/getProjects_1).

:::

Retrieve the attribute's elements using `GET /api/dataModels/{dataModelId}/attributes/{id}/elements`.

Sample Request Header:

```http
"accept": "application/json"
"X-MSTR-AuthToken": "4bb7n1dhjo860e7tlpchg57hl"
"X-MSTR-ProjectID": "B7CA92F04B9FAE8D941C3E9B7E0CD754"
```

Sample Request Body: Empty

Sample Curl:

```bash
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"
```

Sample Response Body:

You can view the data model's attribute's elements in the response body.

```json
[
{
"name": "2015",
"id": "h2015;;2015"
},
{
"name": "2016",
"id": "h2016;;2016"
},
{
"name": "2017",
"id": "h2017;;2017"
},
{
"name": "2018",
"id": "h2018;;2018"
}
]
```

Response Code 200: (The attribute's elements is returned successfully.)
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Manage data model object acl
description: You can use REST API requests to retrieve and update acl of objects in data model through the Modeling service.
---

<Available since="Strategy ONE (August 2025)" />

:::tip

You can try these workflows with [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).

Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).

:::

You can use REST API requests to retrieve and update acl of objects in data model through the Modeling service.

- [Get ACL of an object in a Data Model](retrieve-a-data-model-object-acl.md)
- [Update ACL of an object in a Data Model](update-a-data-model-object-acl.md)

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).
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
---
title: Retrieve acl of an object inside a data model
description: You can use REST API requests to retrieve acl of an object inside a data model.
---

<Available since="Strategy ONE (August 2025)" />

:::tip

You can try out this workflow at [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).

Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).

:::

You can use REST APIs to retrieve the acl of an object inside a data model through the Modeling service.

## Retrieve acl of an attribute inside a data model

There is a "Customer Statistics" data model with an "A44F79895E9247719292556AA14373F5" ID. This data model contains a "Customer" attribute with an "B9E7FD5911D3E936C000B3B2D86C964F" ID.
You want to get the acl of the "Customer" attribute.

:::info

To get the authorization token needed to execute the request, use `POST /api/auth/login`.

Get the project ID from `GET /api/projects`.

:::

:::tip

Changesets are used in this workflow. For information on how to create and use changesets, see [Changesets](/docs/common-workflows/modeling/changesets.md).

:::

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

Sample Request Header

```http
"accept": "application/json"
"X-MSTR-AuthToken": "pisu5dkkutqfblaamdomgr00ch"
"X-MSTR-MS-Changeset": "0E9F01172ECF4BA2BB510F7B9FB4F6E8"
```

Sample Request Body: Empty

Sample Curl:

```bash
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"
```

Sample Response Body:

```json
{
"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"
}
}
}
```

Response Code: 200
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
title: Update acl of an object inside a data model
description: You can use REST API requests to update acl of an object inside a data model.
---

<Available since="Strategy ONE (August 2025)" />

:::tip

You can try out this workflow at [REST API Playground](https://www.postman.com/microstrategysdk/microstrategy-rest-api/collection/5aq5sem/strategy-rest-api-workflows).

Learn more about Strategy REST API Playground [here](/docs/getting-started/playground.md).

:::

You can use REST APIs to update the acl of an object inside a data model through the Modeling service.

## Update acl of a metric inside a data model

There is a "Customer Statistics" data model with an "A44F79895E9247719292556AA14373F5" ID. This data model contains a "Sales" metric with an "B9E7FD5911D3E936C000B3B2D86C964F" ID.
You want to update the acl of the "Sales" metric.

:::info

To get the authorization token needed to execute the request, use `POST /api/auth/login`.

Get the project ID from `GET /api/projects`.

:::

:::tip

Changesets are used in this workflow. For information on how to create and use changesets, see [Changesets](/docs/common-workflows/modeling/changesets.md).

:::

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

Sample Request Header

```http
"accept": "application/json"
"X-MSTR-AuthToken": "pisu5dkkutqfblaamdomgr00ch"
"X-MSTR-MS-Changeset": "0E9F01172ECF4BA2BB510F7B9FB4F6E8"
```

Sample Request Body:

```json
{
"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"
}
}
}
```

Sample Curl:

```bash
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"}}}'
```

Sample Response Body:

```json
{
"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"
}
}
}
```

Response Code: 200
Loading