From a382d761cc867d6f6c5dfdc3d25fd7acd57b4269 Mon Sep 17 00:00:00 2001 From: chaliu Date: Mon, 12 Oct 2026 17:02:36 +0800 Subject: [PATCH] Update --- .../data-lineage-analysis-via-rest-apis.md | 8 +- .../create-a-data-model-parameter.md | 114 +++++++++++++++ .../delete-a-data-model-parameter.md | 51 +++++++ .../manage-data-model-parameters.md | 23 ++++ .../retrieve-a-data-model-parameter.md | 103 ++++++++++++++ ...rieve-data-model-parameter-translations.md | 73 ++++++++++ .../retrieve-data-model-parameters.md | 130 ++++++++++++++++++ .../update-a-data-model-parameter.md | 116 ++++++++++++++++ docs/whats-new.md | 1 + sidebars.js | 16 +++ 10 files changed, 631 insertions(+), 4 deletions(-) create mode 100644 docs/common-workflows/mosaic/manage-data-model-parameters/create-a-data-model-parameter.md create mode 100644 docs/common-workflows/mosaic/manage-data-model-parameters/delete-a-data-model-parameter.md create mode 100644 docs/common-workflows/mosaic/manage-data-model-parameters/manage-data-model-parameters.md create mode 100644 docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-a-data-model-parameter.md create mode 100644 docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameter-translations.md create mode 100644 docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameters.md create mode 100644 docs/common-workflows/mosaic/manage-data-model-parameters/update-a-data-model-parameter.md diff --git a/docs/common-workflows/analytics/object-discovery/data-lineage-analysis-via-rest-apis.md b/docs/common-workflows/analytics/object-discovery/data-lineage-analysis-via-rest-apis.md index 53d6337cf..e2f6aca08 100644 --- a/docs/common-workflows/analytics/object-discovery/data-lineage-analysis-via-rest-apis.md +++ b/docs/common-workflows/analytics/object-discovery/data-lineage-analysis-via-rest-apis.md @@ -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. @@ -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. diff --git a/docs/common-workflows/mosaic/manage-data-model-parameters/create-a-data-model-parameter.md b/docs/common-workflows/mosaic/manage-data-model-parameters/create-a-data-model-parameter.md new file mode 100644 index 000000000..9117885ef --- /dev/null +++ b/docs/common-workflows/mosaic/manage-data-model-parameters/create-a-data-model-parameter.md @@ -0,0 +1,114 @@ +--- +title: Create a data model parameter +description: This workflow demonstrates how to create a data model parameter using REST API. +--- + + + +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) diff --git a/docs/common-workflows/mosaic/manage-data-model-parameters/delete-a-data-model-parameter.md b/docs/common-workflows/mosaic/manage-data-model-parameters/delete-a-data-model-parameter.md new file mode 100644 index 000000000..fdb7aab34 --- /dev/null +++ b/docs/common-workflows/mosaic/manage-data-model-parameters/delete-a-data-model-parameter.md @@ -0,0 +1,51 @@ +--- +title: Delete a data model parameter +description: This workflow demonstrates how to delete a data model parameter using REST API. +--- + + + +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) diff --git a/docs/common-workflows/mosaic/manage-data-model-parameters/manage-data-model-parameters.md b/docs/common-workflows/mosaic/manage-data-model-parameters/manage-data-model-parameters.md new file mode 100644 index 000000000..f44c74fb7 --- /dev/null +++ b/docs/common-workflows/mosaic/manage-data-model-parameters/manage-data-model-parameters.md @@ -0,0 +1,23 @@ +--- +title: Manage data model parameters +description: You can use REST API requests to manage data model parameters. +--- + + + +:::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) diff --git a/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-a-data-model-parameter.md b/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-a-data-model-parameter.md new file mode 100644 index 000000000..5887be524 --- /dev/null +++ b/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-a-data-model-parameter.md @@ -0,0 +1,103 @@ +--- +title: Retrieve a data model parameter +description: This workflow demonstrates how to retrieve a data model parameter using REST API. +--- + + + +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) diff --git a/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameter-translations.md b/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameter-translations.md new file mode 100644 index 000000000..b2d81e281 --- /dev/null +++ b/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameter-translations.md @@ -0,0 +1,73 @@ +--- +title: Retrieve data model parameter translations +description: This workflow demonstrates how to retrieve data model parameter translations using REST API. +--- + + + +This workflow sample demonstrates how to retrieve the translations of the parameters that belong to a data model using the REST API. This is a read-only operation that works against the committed data model and does not require a changeset. + +:::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). + +::: + +Endpoint: [GET /api/model/dataModels/\{dataModelId}/parameters/translations](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Model/getDataModelParametersTranslations) + +You can use the optional `limit` and `offset` query parameters for pagination. + +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/translations?limit=2&offset=0' \ +-H 'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82' \ +-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' +``` + +Sample Response + +- Response Body: + +```json +{ + "offset": 0, + "limit": 2, + "total": 1, + "parameterTranslations": [ + { + "id": "4737A7E131FC4B77898DE3BD55CC4379", + "name": { + "targetName": "Object Name", + "translationValues": { + "1033": { + "translation": "Date Range Prompt" + }, + "1031": { + "translation": "Datumsbereichsaufforderung" + } + } + }, + "description": { + "targetName": "Object Description", + "translationValues": {} + } + } + ] +} +``` + +- Response Code: 200 (Success: OK) diff --git a/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameters.md b/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameters.md new file mode 100644 index 000000000..7086014e7 --- /dev/null +++ b/docs/common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameters.md @@ -0,0 +1,130 @@ +--- +title: Retrieve data model parameters +description: This workflow demonstrates how to retrieve data model parameters using REST API. +--- + + + +This workflow sample demonstrates how to retrieve all parameters that belong to a data model using the REST API. Parameters are value prompts tracked in the data model report definition's parameters collection. + +:::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](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Model/getDataModelParameters) + +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' \ +-H 'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82' \ +-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' +``` + +Sample Response + +- Response Body: + +```json +{ + "offset": 0, + "limit": -1, + "total": 2, + "parameters": [ + { + "information": { + "dateCreated": "2026-08-27T08:51:50.958Z", + "dateModified": "2026-08-27T08:51:50.958Z", + "versionId": "C47943524FCA63A86BCDBF99EFE3424C", + "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" + } + }, + { + "information": { + "dateCreated": "2026-08-27T08:51:50.958Z", + "dateModified": "2026-08-27T08:51:50.958Z", + "versionId": "C47943524FCA63A86BCDBF99EFE3424C", + "acg": 255, + "primaryLocale": "en-US", + "objectId": "2A1C9F3C8F0B4E6D8A7B5C2D3E4F5A6B", + "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) diff --git a/docs/common-workflows/mosaic/manage-data-model-parameters/update-a-data-model-parameter.md b/docs/common-workflows/mosaic/manage-data-model-parameters/update-a-data-model-parameter.md new file mode 100644 index 000000000..43ab1b5ff --- /dev/null +++ b/docs/common-workflows/mosaic/manage-data-model-parameters/update-a-data-model-parameter.md @@ -0,0 +1,116 @@ +--- +title: Update a data model parameter +description: This workflow demonstrates how to update a data model parameter using REST API. +--- + + + +This workflow sample demonstrates how to update 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: [PUT /api/model/dataModels/\{dataModelId}/parameters/\{parameterId}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Model/updateDataModelParameter) + +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 updates the parameter's name, title, instruction, default answer, and restriction range. + +```json +{ + "information": { + "objectId": "E6CD1AA47E5A4DB7B23EDAA6FBC07578", + "destinationFolderId": "FB63EDEB81474D2DB675CA7E865F814E", + "subType": "prompt_double", + "name": "Region Range Prompt" + }, + "title": "Region", + "instruction": "Enter a region.", + "defaultAnswer": { + "value": 202005 + }, + "restriction": { + "min": 1, + "max": 202512 + } +} +``` + +- Curl + +```bash +curl -L -X PUT 'http://demo.microstrategy.com/MicroStrategyLibrary/api/model/dataModels/3A82F20B2CC849B0970B289C86D8C83C/parameters/E6CD1AA47E5A4DB7B23EDAA6FBC07578' \ +-H 'X-MSTR-AuthToken: pk2dudliaoqh5hmv240ururl82' \ +-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \ +-H 'X-MSTR-MS-Changeset: 768A0AA9E94547218BA930DD4245186B' \ +-H 'Content-Type: application/json' \ +-d '{ + "information": { + "objectId": "E6CD1AA47E5A4DB7B23EDAA6FBC07578", + "destinationFolderId": "FB63EDEB81474D2DB675CA7E865F814E", + "subType": "prompt_double", + "name": "Region Range Prompt" + }, + "title": "Region", + "instruction": "Enter a region.", + "defaultAnswer": { + "value": 202005 + }, + "restriction": { + "min": 1, + "max": 202512 + } +}' +``` + +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": 1.0, + "max": 202512.0, + "interval": 1.0, + "allowedValueType": "range" + } +} +``` + +- Response Code: 200 (Success: OK) diff --git a/docs/whats-new.md b/docs/whats-new.md index 09420e3e4..ef2c4bdb9 100644 --- a/docs/whats-new.md +++ b/docs/whats-new.md @@ -7,6 +7,7 @@ Description: What's New in the REST API. ## Strategy (September 2026) - [Apply Parameters to a Data Model Instance](common-workflows/mosaic/retrieve-data-from-data-models/apply-parameters-to-a-data-model-instance.md) +- [Manage Data Model Parameters](common-workflows/mosaic/manage-data-model-parameters/manage-data-model-parameters.md) ## Strategy (May 2026) diff --git a/sidebars.js b/sidebars.js index adb1be484..456219777 100644 --- a/sidebars.js +++ b/sidebars.js @@ -1231,6 +1231,22 @@ const sidebars = { "common-workflows/mosaic/manage-data-model-folders/create-update-and-delete-a-folder", ], }, + { + type: "category", + label: "Manage data model parameters", + link: { + type: "doc", + id: "common-workflows/mosaic/manage-data-model-parameters/manage-data-model-parameters", + }, + items: [ + "common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameters", + "common-workflows/mosaic/manage-data-model-parameters/create-a-data-model-parameter", + "common-workflows/mosaic/manage-data-model-parameters/retrieve-a-data-model-parameter", + "common-workflows/mosaic/manage-data-model-parameters/update-a-data-model-parameter", + "common-workflows/mosaic/manage-data-model-parameters/delete-a-data-model-parameter", + "common-workflows/mosaic/manage-data-model-parameters/retrieve-data-model-parameter-translations", + ], + }, { type: "category", label: "Manage data model security filters",