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
Expand Up @@ -44,13 +44,13 @@ You need to use the metadata search API to get the indirect and direct component
Curl:

```bash
curl -X POST "https://demo.microstrategy/MicroStrategyLibrary/api/metadataSearches/results?domain=2&usedByObject=B7CA92F04B9FAE8D941C3E9B70CD754%3B32&usedByRecursive=false" -H "accept: application/json" -H "X-MSTR-AuthToken: 14bu7siu403m9qr9987ejofill" -H "X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754"
curl -X POST "https://demo.microstrategy.com/MicroStrategyLibrary/api/metadataSearches/results?domain=2&usedByObject=B7CA92F04B9FAE8D941C3E9B70CD754%3B32&usedByRecursive=false" -H "accept: application/json" -H "X-MSTR-AuthToken: 14bu7siu403m9qr9987ejofill" -H "X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754"
```

Request URL:

```url
https://demo.microstrategy/MicroStrategyLibrary/api/metadataSearches/results?domain=2&usedByObject=B7CA92F04B9FAE8D941C3E9B7E0CD754%3B32&usedByRecursive=false
https://demo.microstrategy.com/MicroStrategyLibrary/api/metadataSearches/results?domain=2&usedByObject=B7CA92F04B9FAE8D941C3E9B7E0CD754%3B32&usedByRecursive=false
```

1. Use `GET /api/metadataSearches/results` to get the search results. Get the search results previously stored in an instance in the Intelligence Server memory and display them in a list.
Expand All @@ -71,13 +71,13 @@ You need to use the metadata search API to get the indirect and direct dependent
Curl:

```bash
curl -X POST "https://demo.microstrategy/MicroStrategyLibrary/api/metadataSearches/results?domain=2&usesObject=B7CA92F04B9FAE8D941C3E9B70CD754%3B32&usesRecursive=false" -H "accept: application/json" -H "X-MSTR-AuthToken: 14bu7siu403m9qr9987ejofill" -H "X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754"
curl -X POST "https://demo.microstrategy.com/MicroStrategyLibrary/api/metadataSearches/results?domain=2&usesObject=B7CA92F04B9FAE8D941C3E9B70CD754%3B32&usesRecursive=false" -H "accept: application/json" -H "X-MSTR-AuthToken: 14bu7siu403m9qr9987ejofill" -H "X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754"
```

Request URL:

```url
https://demo.microstrategy/MicroStrategyLibrary/api/metadataSearches/results?domain=2 usesObject=B7CA92F04B9FAE8D941C3E9B7E0CD754%3B32&usesRecursive=false
https://demo.microstrategy.com/MicroStrategyLibrary/api/metadataSearches/results?domain=2&usesObject=B7CA92F04B9FAE8D941C3E9B7E0CD754%3B32&usesRecursive=false
```

1. Get the search results by using `GET /api/metadataSearches/results`. Get the search results previously stored in an instance in the Intelligence Server memory and display them in a list.
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
---
title: Create a data model parameter
description: This workflow demonstrates how to create a data model parameter using REST API.
---

<Available since="Strategy (May 2026)" />

This workflow sample demonstrates how to create a parameter (value prompt) owned by a data model using the REST API.

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

:::

:::tip

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

:::

Endpoint: [POST /api/model/dataModels/\{dataModelId}/parameters](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Model/createDataModelParameter)

Sample Request

- Request Headers

```http
'Content-Type: application/json'
'Accept: application/json'
'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82'
'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754'
'X-MSTR-MS-Changeset: 768A0AA9E94547218BA930DD4245186B'
```

- Request Body

The example below creates a value parameter (a value prompt) of type `prompt_double`, with a default answer and a numeric range restriction.

```json
{
"information": {
"subType": "prompt_double",
"name": "Region Range Prompt",
"description": "Enter a region."
},
"defaultAnswer": {
"value": 202005
},
"restriction": {
"allowedValueType": "range",
"min": 202001,
"max": 202512,
"interval": 1
}
}
```

- Curl

```bash
curl -L -X POST 'http://demo.microstrategy.com/MicroStrategyLibrary/api/model/dataModels/3A82F20B2CC849B0970B289C86D8C83C/parameters' \
-H 'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82' \
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \
-H 'X-MSTR-MS-Changeset: 768A0AA9E94547218BA930DD4245186B' \
-H 'Content-Type: application/json' \
-d '{
"information": {
"subType": "prompt_double",
"name": "Region Range Prompt",
"description": "Enter a region."
},
"defaultAnswer": {
"value": 202005
},
"restriction": {
"allowedValueType": "range",
"min": 202001,
"max": 202512,
"interval": 1
}
}'
```

Sample Response

- Response Body:

```json
{
"information": {
"versionId": "941BA80ADC7347E3B2E4923BB3486F62",
"acg": 255,
"primaryLocale": "en-US",
"objectId": "E6CD1AA47E5A4DB7B23EDAA6FBC07578",
"subType": "prompt_double",
"name": "Region Range Prompt",
"destinationFolderId": "FB63EDEB81474D2DB675CA7E865F814E"
},
"defaultAnswer": {
"value": 202005.0
},
"restriction": {
"min": 202001.0,
"max": 202512.0,
"interval": 1.0,
"allowedValueType": "range"
}
}
```

- Response Code: 201 (Created)
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
title: Delete a data model parameter
description: This workflow demonstrates how to delete a data model parameter using REST API.
---

<Available since="Strategy (May 2026)" />

This workflow sample demonstrates how to delete a parameter that belongs to a data model using the REST API.

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

:::

:::tip

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

:::

Endpoint: [DELETE /api/model/dataModels/\{dataModelId}/parameters/\{parameterId}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Model/deleteDataModelParameter)

Sample Request

- Request Headers

```http
'Content-Type: application/json'
'Accept: application/json'
'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82'
'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754'
'X-MSTR-MS-Changeset: 768A0AA9E94547218BA930DD4245186B'
```

- Curl

```bash
curl -L -X DELETE 'http://demo.microstrategy.com/MicroStrategyLibrary/api/model/dataModels/3A82F20B2CC849B0970B289C86D8C83C/parameters/69DBF4F24BFC44BABFE4B5CD4D2E9A93' \
-H 'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82' \
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \
-H 'X-MSTR-MS-Changeset: 768A0AA9E94547218BA930DD4245186B'
```

Sample Response

The parameter is deleted successfully.

- Response Code: 204 (No Content)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Manage data model parameters
description: You can use REST API requests to manage data model parameters.
---

<Available since="Strategy (May 2026)" />

:::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 manage data model parameters. Parameters are value prompts owned by a data model, tracked in the dataset report definition's parameters collection.

- [Retrieve Data Model Parameters](retrieve-data-model-parameters.md)
- [Create a Data Model Parameter](create-a-data-model-parameter.md)
- [Retrieve a Data Model Parameter](retrieve-a-data-model-parameter.md)
- [Update a Data Model Parameter](update-a-data-model-parameter.md)
- [Delete a Data Model Parameter](delete-a-data-model-parameter.md)
- [Retrieve Data Model Parameter Translations](retrieve-data-model-parameter-translations.md)
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
---
title: Retrieve a data model parameter
description: This workflow demonstrates how to retrieve a data model parameter using REST API.
---

<Available since="Strategy (May 2026)" />

This workflow sample demonstrates how to retrieve a specific parameter that belongs to a data model using the REST API.

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

:::

:::tip

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

:::

Endpoint: [GET /api/model/dataModels/\{dataModelId}/parameters/\{parameterId}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Model/getDataModelParameter)

You can use the optional `showExpressionAs` and `showWebOptions` query parameters to control the format of the returned parameter definition.

Sample Request

- Request Headers

```http
'Content-Type: application/json'
'Accept: application/json'
'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82'
'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754'
```

- Curl

```bash
curl -L -X GET 'http://demo.microstrategy.com/MicroStrategyLibrary/api/model/dataModels/3A82F20B2CC849B0970B289C86D8C83C/parameters/4737A7E131FC4B77898DE3BD55CC4379?showExpressionAs=tree&showWebOptions=true' \
-H 'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82' \
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754'
```

Sample Response

- Response Body:

```json
{
"information": {
"dateCreated": "2026-08-27T08:51:50.958Z",
"dateModified": "2026-08-27T08:51:50.958Z",
"versionId": "C47943524FCA63A86BCDBF99EFE3424C",
"acg": 255,
"primaryLocale": "en-US",
"objectId": "4737A7E131FC4B77898DE3BD55CC4379",
"subType": "prompt_date",
"name": "Date Range Prompt",
"destinationFolderId": "FB63EDEB81474D2DB675CA7E865F814E"
},
"defaultAnswer": {
"value": {
"parameterType": "dynamic_date_time",
"dynamicDateTime": {
"type": "date",
"date": {
"mode": "static",
"value": "2026-08-15"
}
}
}
},
"restriction": {
"min": {
"parameterType": "dynamic_date_time",
"dynamicDateTime": {
"type": "date",
"date": {
"mode": "static",
"value": "2026-08-01"
}
}
},
"max": {
"parameterType": "dynamic_date_time",
"dynamicDateTime": {
"type": "date",
"date": {
"mode": "static",
"value": "2026-08-20"
}
}
},
"allowedValueType": "range"
},
"showTime": false
}
```

- Response Code: 200 (Success: OK)
Loading
Loading