Skip to content

Commit 62ee825

Browse files
JianWaterjianli_mstr
andauthored
update (#74)
Co-authored-by: jianli_mstr <jianli@strategy.com>
1 parent f8c1bfc commit 62ee825

File tree

10 files changed

+349
-50
lines changed

10 files changed

+349
-50
lines changed

docs/common-workflows/administration/distribution-services/manage-subscriptions/mobile-subscriptions.md

Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,17 @@ This workflow sample demonstrates how to create and update a mobile subscription
1212

1313
:::tip
1414

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

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

2119
:::
2220

2321
## Create a new mobile subscription
2422

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

28-
This endpoint allows you to create a new subscription for a given project. Obtain the authorization
29-
token needed to execute the request using `POST /api/auth/login`. Obtain the project ID using
30-
`GET /api/projects`. Provide the information used to create a subscription in the body parameter of
31-
the request. If the call is successful, the resulting HTTP response returns an HTTP status code of
32-
201 and a response body containing all the information on the newly created subscription.
25+
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.
3326

3427
Sample Request
3528

@@ -211,15 +204,9 @@ Sample Response
211204

212205
## Update an existing mobile subscription
213206

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

217-
This endpoint allows you to update all of the information for a specific subscription. Obtain the
218-
authorization token needed to execute the request using `POST /api/auth/login`. Obtain the project
219-
ID using `GET /api/projects`. Provide the information used to update a subscription in the body
220-
parameter of the request and provide the subscription ID in the request path. If the call is
221-
successful, the resulting HTTP response returns an HTTP status code of 200 and a response body
222-
containing all the information on the updated subscription.
209+
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.
223210

224211
Sample Request
225212

docs/common-workflows/analytics/auto-bot-api/get-question-by-id.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@ This workflow sample demonstrates how to get a question's answer by the question
1010

1111
:::info
1212

13-
Obtain the authorization token needed to execute the request using
14-
[POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).
13+
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).
1514

1615
:::
1716

1817
## Get a question with question ID
1918

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

23-
:::note Replace `{questionId}` in `GET /api/questions/{questionId}` with your question ID from
24-
`POST /api/questions`. :::
21+
:::note
22+
Replace `{questionId}` in `GET /api/questions/{questionId}` with your question ID from `POST /api/questions`.
23+
:::
2524

26-
Sample Request Body: No request body.
25+
Sample Request Body:
26+
No request body.
2727

2828
Sample Curl:
2929

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

5050
### Response when the question is still being processed
5151

52-
If the response code is 202, indicating that the question is still being processed, continue calling
53-
this API to check the status of the question.
52+
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.
5453

5554
If the question is being processed, the response is:
5655

docs/common-workflows/analytics/auto-bot-api/get-questions-by-bot.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,20 +6,17 @@ description: This workflow sample demonstrates how to get the historical chat me
66

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

9-
This API is used to get the historical questions from a specific agent for the current user, which
10-
can be used as the `history` parameter in the `Ask a question to a specific agent` API.
9+
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.
1110

1211
:::info
1312

14-
Obtain the authorization token needed to execute the request using
15-
[POST /api/auth/login](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogin).
13+
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).
1614

1715
:::
1816

1917
## Get Questions by Agent
2018

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

2421
Sample Request Headers:
2522

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

103-
:::note Questions with `type` as `snapshots` should not be used as history in the
104-
`Ask a Specific Bot a Question` API. :::
100+
:::note
101+
Questions with `type` as `snapshots` should not be used as history in the `Ask a Specific Bot a Question` API.
102+
:::
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
---
2+
title: Get categories for an unstructured data
3+
description: This page explains how to retrieve categories (tags) for a specific unstructured data item that helps agents better understand and use the data.
4+
---
5+
6+
<Available since="Strategy ONE (March 2026)" />
7+
8+
This API is used to retrieve the categories for unstructured data. Categories are tags that describe the data within the unstructured data, helping agents better understand the context and content of the data source. By retrieving the categories, you can see which descriptive tags have been assigned to the data and use this information to understand how agents will interpret and utilize the data source when answering questions.
9+
10+
:::info
11+
12+
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).
13+
14+
:::
15+
16+
## Get categories for an unstructured data
17+
18+
Endpoint: [GET /api/nuggets/\{id}/categories](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Auto%20Bots/getCategories)
19+
20+
Request Parameters:
21+
22+
| Name | Located in | Description | Required | Type |
23+
| ---------------- | ---------- | --------------------------- | -------- | ------ |
24+
| id | path | ID of the unstructured data | Yes | string |
25+
| X-MSTR-AuthToken | header | Authentication token | Yes | string |
26+
| X-MSTR-ProjectID | header | Project ID | Yes | string |
27+
28+
Sample Curl:
29+
30+
```bash
31+
# Replace with your actual values
32+
curl -X GET 'https://demo.microstrategy.com/MicroStrategyLibrary/api/nuggets/4B7EF8B549D2D32E941C3E9B7E0CD754/categories' \
33+
-H 'X-MSTR-AuthToken: pqu5mkrcbv4461hh5qprr9j5ve' \
34+
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \
35+
-H 'Content-Type: application/json'
36+
```
37+
38+
Sample Response:
39+
40+
HTTP Status: 200 OK
41+
42+
```json
43+
{
44+
"key1": ["v11", "v12", "v13"],
45+
"key2": ["v2", "v22"]
46+
}
47+
```
48+
49+
Response Structure:
50+
51+
The response is a JSON object where:
52+
53+
- Each key represents a category name (tag type)
54+
- Each value is an array of strings representing the category values (tags) for that category
55+
56+
Notes:
57+
58+
- This API returns a 200 OK response with the categories as a JSON object.
59+
- Categories are key-value pairs where the key is the category name (tag type) and the value is an array of strings (tags).
60+
- If no categories are defined for the unstructured data, an empty object `{}` will be returned.
61+
- Categories serve as descriptive tags that help agents understand the nature and context of the data, enabling them to provide more accurate and relevant answers.
62+
63+
## Use Cases
64+
65+
Tag Discovery and Understanding:
66+
67+
The main use cases for this API include discovering and understanding the descriptive tags assigned to unstructured data:
68+
69+
1. **Understanding Data Context**: Retrieve category tags to understand how the data is described and what context agents use when referencing this data source.
70+
1. **Tag Validation**: Before updating categories, retrieve the current tags to understand the existing descriptive structure and ensure consistency.
71+
1. **Data Source Inspection**: Check which tags are assigned to a data source to verify that agents will have the proper context for answering questions.
72+
1. **UI Display**: Display the category tags in your user interface to help users understand what kind of information is contained in the unstructured data.
73+
1. **Tag Analytics**: Analyze tag usage across multiple data sources to ensure consistent tagging and identify data sources that may need better descriptions.
74+
75+
Example implementation:
76+
77+
- Fetch category tags when displaying an unstructured data detail page to show users what kind of data is contained.
78+
- Retrieve tags before updating them to ensure you maintain consistency with existing descriptive schemes.
79+
- Use tag information to provide users with context about which questions the data source can help answer.
80+
- Display tags in administrative interfaces to help users understand how agents interpret different data sources.
81+
- Analyze tags across multiple data sources to ensure consistent and effective tagging for agent performance.
82+
Best Practices:
83+
84+
- Cache category tag information to reduce API calls, especially if tags don't change frequently.
85+
- Handle empty category responses gracefully, indicating that the data source has no descriptive tags.
86+
- Review retrieved tags to ensure they accurately describe the data and support agent understanding.
87+
- Use tag information to help users understand what kind of questions this data source can help answer.
88+
- Verify tags are meaningful and descriptive before relying on them for agent context.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: Unstructured Data APIs
3+
description: This page contains a summary of REST APIs for managing unstructured data. You can use REST API requests to update and configure unstructured data that agents use to answer questions.
4+
---
5+
6+
<Available since="Strategy ONE (March 2026)" />
7+
8+
Strategy ONE (March 2026) introduces a set of public APIs designed to manage unstructured data that power agent capabilities.
9+
10+
The Unstructured Data APIs provide comprehensive control over unstructured data, allowing you to update data content, manage categories (tags) that describe the data, and retrieve category information. Unstructured data serves as knowledge sources that agents use to provide contextual and accurate answers to user questions. Categories are descriptive tags that help agents understand the nature and content of each data source, enabling them to provide more relevant and accurate responses. These APIs enable you to keep your data up-to-date and well-described, ensuring optimal agent performance.
11+
12+
Previously available as internal APIs, these endpoints are now publicly accessible, enabling developers to seamlessly integrate unstructured data management into their applications and workflows.
13+
14+
### Key Features
15+
16+
- **Update unstructured data**: Re-upload files to refresh or replace the content of existing unstructured data, keeping your agent's knowledge base current.
17+
- **Update categories**: Assign or modify category tags that describe the data within unstructured data, helping agents better understand the content and context of each data source.
18+
- **Retrieve categories**: Get the current category tags of an unstructured data source to understand which descriptive information is available to agents.
19+
20+
### Benefits
21+
22+
- **Content Freshness**: Keep your agent's knowledge base up-to-date by replacing outdated documents with current versions.
23+
- **Better Agent Understanding**: Use category tags to describe the data within unstructured data, helping agents understand the context and content of each data source.
24+
- **Improved Answer Accuracy**: By tagging data with relevant categories, agents can better understand when and how to use specific data sources, resulting in more accurate and contextually relevant answers.
25+
- **Flexible Content Management**: Update data without needing to reconfigure your agents or change their IDs.
26+
27+
For more information on how to use these APIs, see the following sections of this manual:
28+
29+
- [Update an unstructured data](./update-unstructured-data.md)
30+
- [Update categories for an unstructured data](./update-unstructured-data-categories.md)
31+
- [Get categories for an unstructured data](./get-unstructured-data-categories.md)
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
title: Update categories for an unstructured data
3+
description: This page explains how to retrieve categories (tags) for a specific unstructured data item that helps agents better understand and use the data.
4+
---
5+
6+
<Available since="Strategy ONE (March 2026)" />
7+
8+
This API is used to update the categories for unstructured data. Categories are tags that describe the data within the unstructured data, helping agents better understand the context and content of the data source. By assigning appropriate categories (tags), you enable agents to provide more accurate and contextually relevant answers to user questions.
9+
10+
:::info
11+
12+
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).
13+
14+
:::
15+
16+
## Update categories for an unstructured data
17+
18+
Endpoint: [PUT /api/nuggets/\{id}/categories](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Auto%20Bots/updateCategories)
19+
20+
Request Parameters:
21+
22+
| Name | Located in | Description | Required | Type |
23+
| ---------------- | ---------- | --------------------------- | -------- | ------ |
24+
| id | path | ID of the unstructured data | Yes | string |
25+
| X-MSTR-AuthToken | header | Authentication token | Yes | string |
26+
| X-MSTR-ProjectID | header | Project ID | Yes | string |
27+
| body | body | Categories to update | Yes | object |
28+
29+
Request Body:
30+
31+
The request body should be a JSON object where each key represents a category name and the value is an array of category values. For example:
32+
33+
```json
34+
{
35+
"key1": ["v11", "v12", "v13"],
36+
"key2": ["v2", "v22"]
37+
}
38+
```
39+
40+
Sample Curl:
41+
42+
```bash
43+
# Replace with your actual values
44+
curl -X PUT 'https://demo.microstrategy.com/MicroStrategyLibrary/api/nuggets/4B7EF8B549D2D32E941C3E9B7E0CD754/categories' \
45+
-H 'X-MSTR-AuthToken: pqu5mkrcbv4461hh5qprr9j5ve' \
46+
-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \
47+
-H 'Content-Type: application/json' \
48+
-d '{
49+
"department": [
50+
"sales",
51+
"marketing",
52+
"engineering"
53+
],
54+
"region": [
55+
"north",
56+
"south"
57+
]
58+
}'
59+
```
60+
61+
Sample Response:
62+
63+
HTTP Status: 200 OK
64+
65+
```json
66+
{
67+
"status": "success"
68+
}
69+
```
70+
71+
Notes:
72+
73+
- This API returns a 200 OK response upon successful update of the categories.
74+
- Categories are key-value pairs where the key is the category name (tag type) and the value is an array of strings representing category values (tags).
75+
- Updating categories will replace the existing categories for the specified unstructured data.
76+
- Categories serve as descriptive tags that help agents understand the nature and context of the data, enabling them to provide more accurate and relevant answers.
77+
78+
## Use Cases
79+
80+
Data Description and Agent Enhancement:
81+
82+
The main use cases for this API include tagging unstructured data to help agents better understand and utilize the content:
83+
84+
1. **Content Description**: Tag unstructured data with descriptive categories (e.g., content type, department, topic) to help agents understand what kind of information is contained in the data source.
85+
1. **Contextual Understanding**: Use category tags to provide context about the data, enabling agents to determine when this data source is relevant for answering specific questions.
86+
1. **Improved Answer Accuracy**: By tagging data with relevant categories, agents can better match user questions to the appropriate data sources, resulting in more accurate and contextually relevant answers.
87+
1. **Domain-Specific Knowledge**: Assign domain-specific tags (e.g., "finance", "HR policies", "technical documentation") to help agents identify which data sources to reference for different types of questions.
88+
89+
Example implementation:
90+
91+
- Define a standard set of category tags for your organization (e.g., "sales", "product-info", "policies", "technical-specs").
92+
- When uploading new unstructured data, assign descriptive tags based on the content and its intended use.
93+
- Update category tags as the content or organizational focus changes to keep agent responses relevant.
94+
- Use consistent tagging schemes across all unstructured data to help agents make better connections.
95+
- Tag data with multiple categories when appropriate to cover different aspects of the content.
96+
97+
Best Practices:
98+
99+
- Use consistent and descriptive naming conventions for category tags across your organization.
100+
- Keep tags simple, clear, and focused on helping agents understand the data content.
101+
- Document your tagging schema to ensure all team members use tags consistently.
102+
- Use specific tags rather than overly broad ones to give agents more precise context.
103+
- Regularly review and update tags to ensure they accurately describe the current data and support agent performance.

0 commit comments

Comments
 (0)