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 @@ -12,17 +12,24 @@ This workflow sample demonstrates how to create and update a mobile subscription

:::tip

This workflow follows the general steps described in [Create and get a subscription](create-and-get-a-subscription.md). You can try out this workflow at [REST API Playground](https://www.postman.com/microstrategysdk/workspace/microstrategy-rest-api/folder/16131298-da43d1b1-a332-4452-829f-e07a041abc8f?ctx=documentation).
This workflow follows the general steps described in
[Create and get a subscription](create-and-get-a-subscription.md). You can try out this workflow at
[REST API Playground](https://www.postman.com/microstrategysdk/workspace/microstrategy-rest-api/folder/16131298-da43d1b1-a332-4452-829f-e07a041abc8f?ctx=documentation).

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

:::

## Create a new mobile subscription

Endpoint: [POST /api/subscriptions](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Subscriptions/createSubscription)
Endpoint:
[POST /api/subscriptions](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Subscriptions/createSubscription)

This endpoint allows you to create a new subscription for a given project. Obtain the authorization token needed to execute the request using `POST /api/auth/login`. Obtain the project ID using `GET /api/projects`. Provide the information used to create a subscription in the body parameter of the request. If the call is successful, the resulting HTTP response returns an HTTP status code of 201 and a response body containing all the information on the newly created subscription.
This endpoint allows you to create a new subscription for a given project. Obtain the authorization
token needed to execute the request using `POST /api/auth/login`. Obtain the project ID using
`GET /api/projects`. Provide the information used to create a subscription in the body parameter of
the request. If the call is successful, the resulting HTTP response returns an HTTP status code of
201 and a response body containing all the information on the newly created subscription.

Sample Request

Expand Down Expand Up @@ -204,9 +211,15 @@ Sample Response

## Update an existing mobile subscription

Endpoint: [PUT /api/subscriptions/\{id}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Subscriptions/updateSubscription)
Endpoint:
[PUT /api/subscriptions/\{id}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Subscriptions/updateSubscription)

This endpoint allows you to update all of the information for a specific subscription. Obtain the authorization token needed to execute the request using `POST /api/auth/login`. Obtain the project ID using `GET /api/projects`. Provide the information used to update a subscription in the body parameter of the request and provide the subscription ID in the request path. If the call is successful, the resulting HTTP response returns an HTTP status code of 200 and a response body containing all the information on the updated subscription.
This endpoint allows you to update all of the information for a specific subscription. Obtain the
authorization token needed to execute the request using `POST /api/auth/login`. Obtain the project
ID using `GET /api/projects`. Provide the information used to update a subscription in the body
parameter of the request and provide the subscription ID in the request path. If the call is
successful, the resulting HTTP response returns an HTTP status code of 200 and a response body
containing all the information on the updated subscription.

Sample Request

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,20 @@ This workflow sample demonstrates how to get a question's answer by the question

:::info

Obtain the authorization token needed to execute the request using [POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).
Obtain the authorization token needed to execute the request using
[POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).

:::

## Get a question with question ID

Endpoint: [GET /api/questions/\{questionId}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Next-Gen%20AI/queryMessage_1)
Endpoint:
[GET /api/questions/\{questionId}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Next-Gen%20AI/queryMessage_1)

:::note
Replace `{questionId}` in `GET /api/questions/{questionId}` with your question ID from `POST /api/questions`.
:::
:::note Replace `{questionId}` in `GET /api/questions/{questionId}` with your question ID from
`POST /api/questions`. :::

Sample Request Body:
No request body.
Sample Request Body: No request body.

Sample Curl:

Expand All @@ -49,7 +49,8 @@ The response is the question and answer with the specific ID.

### Response when the question is still being processed

If the response code is 202, indicating that the question is still being processed, continue calling this API to check the status of the question.
If the response code is 202, indicating that the question is still being processed, continue calling
this API to check the status of the question.

If the question is being processed, the response is:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@ description: This workflow sample demonstrates how to get the historical chat me

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

This API is used to get the historical questions from a specific agent for the current user, which can be used as the `history` parameter in the `Ask a question to a specific agent` API.
This API is used to get the historical questions from a specific agent for the current user, which
can be used as the `history` parameter in the `Ask a question to a specific agent` API.

:::info

Obtain the authorization token needed to execute the request using [POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).
Obtain the authorization token needed to execute the request using
[POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).

:::

## Get Questions by Agent

Endpoint: [GET /api/questions/](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Next-Gen%20AI/getChats_1)
Endpoint:
[GET /api/questions/](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Next-Gen%20AI/getChats_1)

Sample Request Headers:

Expand Down Expand Up @@ -97,6 +100,5 @@ The response is a list of questions and answers from the specific agent.
}
```

:::note
Questions with `type` as `snapshots` should not be used as history in the `Ask a Specific Bot a Question` API.
:::
:::note Questions with `type` as `snapshots` should not be used as history in the
`Ask a Specific Bot a Question` API. :::
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
---
title: Update a scope filter's definition
sidebar_label: Update a scope filter's definition
description: This workflow sample demonstrates how to update a scope filter's definition using the Modeling service.
description:
This workflow sample demonstrates how to update a scope filter's definition using the Modeling
service.
---

<Available since="Strategy ONE (November 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).
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).

:::

This workflow sample demonstrates how to update a scope filter's definition through the using service.
This workflow sample demonstrates how to update a scope filter's definition through the using
service.

1. Create a changeset
1. [Update a scope filter definition](#update-a-scope-filter)
Expand All @@ -23,19 +27,23 @@ This workflow sample demonstrates how to update a scope filter's definition thro

:::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 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).
Get the project ID from
[GET /api/projects](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Projects/getProjects_1).

:::

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

## Update a scope filter

Endpoint:[PUT /api/model/scopeFilters/\{scopeFilterId}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Scope%20Filters/putScopeFilter)

You want to update the scope filter to have an attribute elements prompt based on the "Customer" attribute. The attribute elements should be in the "Smith:Laurell" and "Smith:Sarah" lists.
You want to update the scope filter to have an attribute elements prompt based on the "Customer"
attribute. The attribute elements should be in the "Smith:Laurell" and "Smith:Sarah" lists.

Sample Request Header:

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
---
title: Create an external data model in a data model
sidebar_label: Create an external data model in a data model
description: This workflow sample demonstrates how to create an external data model in a data model through the Modeling service.
---

<Available since="Strategy ONE (January 2026)" />

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

:::

This workflow sample demonstrates how to create an external data model in a data model through the Modeling service.

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

:::

You can create an external data model in a data model using the following endpoint: [POST /api/model/dataModels/\{dataModelId}/externalDataModels](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Models/postExternalDataModel).

Sample Request Header:

```http
"accept": "application/json"
"X-MSTR-AuthToken": "o0ak9privdo27nfo798j40m8aa"
"X-MSTR-MS-Changeset": "805C5F3FB78A436FAE37C943471C24AD"
```

Sample Request Body:

```json
{
"baseDataModel": {
"objectId": "FF2970B298464D88806CCD39F1BA1919",
"subType": "report_emma_cube",
"name": "data model 1"
},
"alias": "external data model 1"
}
```

Sample Curl:

```bash
curl -X POST "https://demo.microstrategy.com/MicroStrategyLibrary/api/model/dataModels/04DCF4F028354FC0AE4B8120CB1983A6/externalDataModels" -H "accept: application/json" -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa" -H "X-MSTR-MS-Changeset: 805C5F3FB78A436FAE37C943471C24AD" -H "Content-Type: application/json" -d '{"baseDataModel":{"objectId":"FF2970B298464D88806CCD39F1BA1919","subType":"report_emma_cube","name":"data model 1"},"alias":"external data model 1"}'
```

Sample Response Body:

```json
{
"id": "AE2FC8E446B14162BF2BCAC64981D5A2",
"baseDataModel": {
"objectId": "FF2970B298464D88806CCD39F1BA1919",
"subType": "report_emma_cube",
"name": "data model 1"
},
"alias": "external data model 1",
"objects": [
{
"objectId": "2877DDA7059B4FFE9DE2711F4D7CD29A",
"subType": "attribute",
"name": "Customer",
"hidden": false,
"alias": "Customer (2)"
},
{
"objectId": "B44A2F49F6B6441796FCA511F1BBFDA5",
"subType": "attribute",
"name": "Churn",
"hidden": false,
"alias": ""
},
{
"objectId": "3FDFCCEFB640428E9341D45B68073601",
"subType": "attribute",
"name": "Lifetime Value Score",
"hidden": false,
"alias": ""
}
]
}
```

Response Code: 201 (A new external data model is created successfully in the changeset.)
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: Delete a data model external data model
sidebar_label: Delete a data model external data model
description: This workflow sample demonstrates how to delete a data model external data model through the Modeling service.
---

<Available since="Strategy ONE (January 2026)" />

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

:::

This workflow sample demonstrates how to delete a data model external data model through the Modeling service.

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

:::

You can delete an external data model from a data model using the following endpoint: [DELETE /api/model/dataModels/\{dataModelId}/externalDataModels/\{externalDataModelId}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Data%20Models/deleteExternalDataModel).

Sample Request Header:

```http
"accept": "application/json"
"X-MSTR-AuthToken": "o0ak9privdo27nfo798j40m8aa"
"X-MSTR-MS-Changeset": "805C5F3FB78A436FAE37C943471C24AD"
```

Sample Request Body: Empty

Sample Curl:

```bash
curl -X DELETE "https://demo.microstrategy.com/MicroStrategyLibrary/api/model/dataModels/04DCF4F028354FC0AE4B8120CB1983A6/externalDataModels/AE2FC8E446B14162BF2BCAC64981D5A2" -H "accept: application/json" -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa" -H "X-MSTR-MS-Changeset: 805C5F3FB78A436FAE37C943471C24AD"
```

Sample Response Body: Empty

Sample Response Code: 204 (The external data model is deleted successfully in the changeset.)
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
---
title: Manage data model external data models
description: You can use REST API requests to manage data model external data models.
---

<Available since="Strategy ONE (January 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 external data models.

- [Retrieve Data Model External Data Models](retrieve-data-model-external-data-models.md)
- [Create a Data Model External Data Model](create-a-data-model-external-data-model.md)
- [Update a Data Model External Data Model](update-a-data-model-external-data-model.md)
- [Delete a Data Model External Data Model](delete-a-data-model-external-data-model.md)
- [Update a Data Model External Data Model's Object](update-a-data-model-external-data-models-object.md)
- [Refresh a Data Model External Data Models](refresh-a-data-model-external-data-models.md)
Loading