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

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions docs/common-workflows/analytics/auto-bot-api/auto-bot-api.md
Original file line number Diff line number Diff line change
@@ -1,30 +1,32 @@
---
title: Next-Gen AI
description: This page contains a summary of REST APIs for the "auto bots" endpoint. You can use REST API requests to interact with Auto Bots.
title: Auto Agent APIs
description: This page contains a summary of REST APIs for the "agent" endpoint. You can use REST API requests to interact with Auto Agents.
---

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

With the release of Strategy ONE (March 2025), we have introduced an enhanced set of APIs designed to leverage the capabilities of Next-Gen AI. These APIs are built on top of the existing question APIs and are compatible with both the Next-Gen AI and the legacy Auto Bots.
Strategy One (March 2025) introduces an enhanced set of APIs designed to leverage the agent capabilities.

The Next-Gen AI APIs provide a seamless way to interact with Next-Gen AI, allowing you to ask questions, retrieve answers, and get historical chat messages from specific bots. Additionally, the APIs offer the ability to get suggested questions, enhancing the user experience by providing relevant queries and answers efficiently.
The Auto Agent APIs provide a seamless way to interact with agents, allowing you to ask questions, retrieve answers, and get historical chat messages from agents. Additionally, the APIs offer the ability to get suggested questions, enhancing the user experience by providing relevant queries and answers efficiently.

Starting from Strategy ONE (June 2025), we've added support for retrieving images within answers, allowing for richer, more visual responses from the Next-Gen AI system. This feature includes customizable resolution settings to optimize image quality based on your specific needs.
Strategy One (June 2025) adds support for retrieving images within answers, allowing for richer, more visual responses from the Auto Agent system. This feature includes customizable resolution settings to optimize image quality based on your specific needs.

If you do not specify an Agent in your API requests, the system will automatically route your questions to the most appropriate Agent based on the context of your query. This intelligent routing ensures that users receive the most relevant responses without needing to manually select an Agent.

### Key Features

- **Ask a question to a specific bot**: Submit a question to the specific Auto Bot. This API has been enhanced from the existing question API.
- **Get answer by the question ID**: Retrieve the answer to a specific question using its ID. This API has been enhanced from the existing question API.
- **Get chat history from a specific bot**: Obtain all historical chat messages from a specific bot.
- **Get suggested questions from a specific bot**: Get recommended questions based on the context from a specific bot.
- **Image support in answers**: Request and retrieve images as part of answers from Next-Gen AI, with customizable resolution settings. (Available from Strategy ONE (June 2025))
- **Get attributes and metrics from a specific bot**: Fetch the column information (attributes and metrics) from a specific bot, which can be used for auto-complete functionality in user inputs. (Available from Strategy ONE (July 2025))
- **Ask a question to the agent**: Submit a question to the agent. This API has been enhanced from the existing question API.
- **Get answer by the question ID**: Retrieve the answer to a question using its ID. This API has been enhanced from the existing question API.
- **Get chat history from the agent**: Obtain all historical chat messages from the agent.
- **Get suggested questions from the agent**: Get recommended questions based on the context from the agent.
- **Image support in answers**: Request and retrieve images as part of answers from agents, with customizable resolution settings. (Available from Strategy One (June 2025))
- **Get attributes and metrics from the agent**: Fetch the column information (attributes and metrics) from the agent, which can be used for auto-complete functionality in user inputs. (Available from Strategy ONE (July 2025))

For further details on how to use these APIs, please refer to the following sections of this manual:

- [Ask a question to a specific bot](./post-question.md)
- [Ask a question to the agent](./post-question.md)
- [Get answer by the question ID](./get-question-by-id.md)
- [Get chat history from a specific bot](./get-questions-by-bot.md)
- [Get suggested questions from a specific bot](./post-suggestion.md)
- [Get chat history from the agent](./get-questions-by-bot.md)
- [Get suggested questions from the agent](./post-suggestion.md)
- [Get image from an answer](./get-image-of-answer.md)
- [Get attributes and metrics from a specific bot](./get-columns.md)
- [Get attributes and metrics from the agent](./get-columns.md)
20 changes: 10 additions & 10 deletions docs/common-workflows/analytics/auto-bot-api/get-columns.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
---
title: Get attributes forms and metrics from a specific bot
description: This page describes how to fetch the column information (attributes and metrics) from a specific bot.
title: Get attributes forms and metrics from a specific agent
description: This page describes how to fetch the column information (attributes and metrics) from a specific agent.
---

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

This API is used to get the column information (attributes forms and metrics) from a specific bot. This information is essential for understanding what data elements the bot can access and use in its answers. The column information can be used to provide auto-complete functionality for user inputs, helping users formulate more accurate questions by suggesting relevant data elements as they type.
This API is used to get column information (attributes forms and metrics) from a specific agent. This information is essential to understand what data elements the agent can access and use in its answers. The column information can be used to provide auto-complete functionality for user inputs, helping users formulate more accurate questions by suggesting relevant data elements as they type.

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

:::

## Get attributes forms and metrics from a specific bot
## Get attributes forms and metrics from a specific agent

Endpoint: [GET /api/v2/bots/\{botId}/columns](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Next-Gen%20AI/getBotColumns)

Request Parameters:

| Name | Located in | Description | Required | Type |
| ---------------- | ---------- | -------------------- | -------- | ------ |
| botId | path | ID of the bot | Yes | string |
| botId | path | ID of the agent | Yes | string |
| X-MSTR-AuthToken | header | Authentication token | Yes | string |
| X-MSTR-ProjectID | header | Project ID | Yes | string |

Expand All @@ -46,21 +46,21 @@ Sample Response:

Notes:

- This API is useful for understanding the data elements that a bot has access to.
- Column information is essential for developers who want to build integrations that utilize specific data from bots.
- This API is useful for understanding the data elements that a agent has access to.
- Column information is essential for developers who want to build integrations that utilize specific data from agents.

## Use Cases

Auto-Complete Functionality:

One of the main purposes of this API is to enable auto-complete functionality for user input:

1. When a user starts typing a question to the bot, your application can retrieve column information to suggest relevant attributes and metrics.
1. When a user starts typing a question to the agent, your application can retrieve column information to suggest relevant attributes and metrics.
1. As the user types, match their input against column names and descriptions to provide real-time suggestions.
1. This improves user experience by helping users formulate better questions and increases the accuracy of bot responses by ensuring users reference valid data elements.
1. This improves user experience by helping users formulate better questions and increases the accuracy of agent responses by ensuring users reference valid data elements.

Example implementation:

- Cache the column information at application startup or when a bot is selected
- Cache the column information at application startup or when an agent is selected
- Implement a suggestion engine that matches partial user input against attribute and metric names
- Display matching columns as suggestions, possibly with their descriptions for additional context
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Get an image in the answer of a specific question
description: This workflow sample demonstrates how to get an image in the answer of a specific question.
---

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

This workflow sample demonstrates how to get an image in the answer of a specific question.

Expand All @@ -14,7 +14,7 @@ Obtain the authorization token needed to execute the request using [POST /api/au

:::

## Get an image of an answer related to a question with bot routing
## Get an image of an answer

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ curl 'https://demo.microstrategy.com/MicroStrategyLibrary/api/questions/91613866

Sample Response Code:

| Response Code | Status |
| ------------- | ------------------------------------------------------------------------------ |
| 200 | Successfully returned the question from the bot that has been answered |
| 202 | Successfully returned the question from the bot which is still being processed |
| 400 | Error in getting the question from the bot |
| 401 | Authorization failed |
| 404 | Question does not exist |
| Response Code | Status |
| ------------- | --------------------------------------------------------------------------------- |
| 200 | Successfully returned the answered question from the agent |
| 202 | Successfully returned the question from the agent, which is still being processed |
| 400 | Error getting the question from the agent |
| 401 | Authorization failed |
| 404 | Question does not exist |

## Response Body on Success

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
---
sidebar_label: Get chat history from a specific bot
title: Get chat history from a specific bot
description: This workflow sample demonstrates how to get the historical chat messages from a specific bot.
sidebar_label: Get chat history from a specific agent
title: Get chat history from a specific agent
description: This workflow sample demonstrates how to get the historical chat messages from a specific agent.
---

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

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

:::

## Get Questions by Bot
## Get Questions by Agent

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

Expand All @@ -28,9 +28,9 @@ Sample Request Headers:

Sample Request Query Strings:

| Query String | Required | Description | Sample Value |
| ------------ | -------- | ---------------------------------------------------------- | -------------------------------- |
| botId | Yes | The ID of the bot whose chat history you want to retrieve. | 065B007500614D158B41B0D020C96966 |
| Query String | Required | Description | Sample Value |
| ------------ | -------- | ------------------------------------------------------------ | -------------------------------- |
| botId | Yes | The ID of the agent whose chat history you want to retrieve. | 065B007500614D158B41B0D020C96966 |

Sample Curl:

Expand All @@ -43,16 +43,16 @@ curl 'https://demo.microstrategy.com/MicroStrategyLibrary/api/questions?botId=06

Sample Response Code:

| Response Code | Status |
| ------------- | ------------------------------------------------ |
| 200 | Successfully returned the questions from the bot |
| 400 | Error in getting the questions from the bot |
| 401 | Authorization failed |
| 404 | Bot does not exist |
| Response Code | Status |
| ------------- | -------------------------------------------------- |
| 200 | Successfully returned the questions from the agent |
| 400 | Error getting questions from the agent |
| 401 | Authorization failed |
| 404 | Agent does not exist |

## Response Body on Success

The response is a list of questions and answers from the specific bot.
The response is a list of questions and answers from the specific agent.

### Sample Response

Expand Down
Loading