diff --git a/docs/common-workflows/administration/migrations/create-and-import-migration-packages/manage-content-group-packages.md b/docs/common-workflows/administration/migrations/create-and-import-migration-packages/manage-content-group-packages.md
index 8adbc708..57a3c208 100644
--- a/docs/common-workflows/administration/migrations/create-and-import-migration-packages/manage-content-group-packages.md
+++ b/docs/common-workflows/administration/migrations/create-and-import-migration-packages/manage-content-group-packages.md
@@ -89,6 +89,7 @@ Sample request of the project package:
{
"id": "54F3D26011D2896560009A8E67019608",
"name": "admin_group",
+ "level": "configuration_object",
"type": 77,
"action": "replace",
"includeDependents": true
@@ -139,6 +140,7 @@ Sample request of the project package:
{
"id": "54F3D26011D2896560009A8E67019608",
"name": "admin_group",
+ "level": "configuration_object",
"type": 77,
"action": "replace",
"includeDependents": true
diff --git a/docs/common-workflows/administration/monitors/project-administration.md b/docs/common-workflows/administration/monitors/project-administration.md
index deb4bb88..fa6bcc66 100644
--- a/docs/common-workflows/administration/monitors/project-administration.md
+++ b/docs/common-workflows/administration/monitors/project-administration.md
@@ -309,6 +309,86 @@ In the example above, the project status of `"MicroStrategy Tutorial"` was chang
}
```
+## Update status for a specific project on all cluster nodes
+
+
+
+Endpoint: [PATCH /api/monitors/projects/status](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Monitors/updateProjectStatusOnAllNodes)
+
+There are several use cases in which it is required to load or unload a project on an environment. A dedicated endpoint `PATCH /api/monitors/projects/status` is implemented to address these use cases. The endpoint call requires to provide the identifier or the name of the project in the query parameters and `X-MSTR-AuthToken` in the header.
+
+If a project ID is passed in the query parameter, we will use the project by ID. Otherwise, a project name must be passed and the project with specific name ignoring cases will be used.
+
+This API will accept the request and start processing to execute based on the request submitted. By default, the API will wait for server session to expire before unloading a project. You can provide a `deleteSessions` query parameter in the case of unloading project to close all active sessions immediately.
+
+- Request parameters:
+
+ - `X-MSTR- AuthToken`: Authorization Token
+ - `projectId`: Project Id
+ - `projectName`: Project name
+ - `deleteSessions`: Whether to close all active sessions when unloading project
+
+- Request body:
+
+ ```json
+ {
+ "status": "loaded" // Valid values are: loaded, unloaded, request_idle, exec_idle, partial_idle, wh_exec_idle, full_idle
+ }
+ ```
+
+- Curl:
+
+ ```bash
+ curl -X PATCH " https:// demo.microstrategy.com/MicroStrategyLibrary/api/monitors/projects/status?projectId=B7CA92F04B9FAE8D941C3E9B7E0CD754" -H "accept: application/json" -H "X-MSTR-AuthToken: jal5uua4uo6gfag1vivmadag17" -H "Content-Type: application/json" -d "{\\"status\\":\\"unloaded\\"}"
+ ```
+
+- Response code: 202 (Accepted)
+
+## Get status for a specific project on all cluster nodes
+
+
+
+Endpoint: [GET /api/monitors/projects/status](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Monitors/getProjectStatusOnAllNodes)
+
+This endpoint queries the status of a project on each node, especially after you load or unload a project with the `PATCH /api/monitors/projects/status` API. The endpoint call requires to provide the identifier or the name of the project in the query parameters and `X-MSTR-AuthToken` in the header.
+
+If a project ID is passed in the query parameter, we will use the project by ID. Otherwise, a project name must be passed and the project with specific name ignoring cases will be used.
+
+You can expect the following statuses of the project to be returned with respect to the nodes: unloaded, loaded, exec_idle, request_idle, full_idle, wh_exec_idle, partial_idle, unloaded_pending, loaded_pending.
+
+- Request parameters:
+
+ - `X-MSTR- AuthToken`: Authorization Token
+ - `projectId`: Project Id
+ - `projectName`: Project name
+
+- Curl:
+
+ ```bash
+ curl -X GET "https://demo.microstrategy.com/MicroStrategyLibrary/api/monitors/projects/status?projectId=B7CA92F04B9FAE8D941C3E9B7E0CD754" -H "accept: application/json" -H "X-MSTR-AuthToken: s664q0cqjergslaj4vfpnneb3m"
+ ```
+
+- Response body:
+
+ ```json
+ {
+ "nodes": [
+ {
+ "serverName": "env-160560laio1use1",
+ "serverPort": 34952,
+ "status": "running"
+ },
+ {
+ "serverName": "env-160560laio2use1",
+ "serverPort": 34952,
+ "status": "unloaded"
+ }
+ ]
+ }
+ ```
+
+- Response code: 200 (Success: OK)
+
## Delete project
@@ -319,7 +399,9 @@ There are several use cases in which it is required to delete a project from an
curl -X 'DELETE' 'https://demo.microstrategy.com/MicroStrategyLibrary/api/projects/A435ED1A4CF916B9A0A0729F9C93C9B9' -H 'accept: */*' -H 'X-MSTR-AuthToken: tp43crmdrkf54avoo9jbgj4a3q'
```
-The response code is either `202 Accepted` or `204 No Content`. The code depends on the deletion execution status. If the endpoint manages to delete the project in a given timeout, it sends `204` code. If the deletion takes longer than the timeout, the endpoint sends `202` code. The status of the operation can be checked using `GET /api/monitors/iServer/nodes` endpoint. If the deletion is successful, the endpoint stops reporting the project. The endpoint will delete a project only if the project has unloaded status on every node. If the project is not unloaded a following error will be provided to a client.
+The response code is either `202 Accepted` or `204 No Content`. The code depends on the deletion execution status. If the endpoint manages to delete the project in a given timeout, it sends `204` code. If the deletion takes longer than the timeout, the endpoint sends `202` code. The status of the operation can be checked using `GET /api/monitors/iServer/nodes` endpoint. If the deletion is successful, the endpoint stops reporting the project.
+
+By default, the endpoint will delete a project only if the project has unloaded status on every node. If the project is not unloaded a following error will be provided to a client.
```json
{
@@ -331,6 +413,14 @@ The response code is either `202 Accepted` or `204 No Content`. The code depends
The project status can be changed using the `PATCH /api/monitors/iServer/nodes/{nodeName}/projects/{projectId}` endpoint. The client can delete the project if it is administrator or owner of the project.
+
+
+You can provide a `deleteSessions` query parameter which will help to automatically close all active sessions across all the clustered nodes and then delete the project. The exemplary call is listed below:
+
+```bash
+curl -X 'DELETE' \ 'https://demo.microstrategy.com/MicroStrategyLibrary/api/projects/B7CA92F04B9FAE8D941C3E9B7E0CD754?deleteSessions=true' \ -H 'accept: */*' \ -H 'X-MSTR-AuthToken: tp43crmdrkf54avoo9jbgj4a3q'
+```
+
## Log out
Endpoint: [POST /api/auth/logout](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Authentication/postLogout)
diff --git a/docs/common-workflows/administration/project-duplication/cross-env-project-duplication.md b/docs/common-workflows/administration/project-duplication/cross-env-project-duplication.md
new file mode 100644
index 00000000..4f755472
--- /dev/null
+++ b/docs/common-workflows/administration/project-duplication/cross-env-project-duplication.md
@@ -0,0 +1,1175 @@
+---
+sidebar_label: Project Duplication (Cross Environment)
+title: Project Duplication (Cross Environment)
+description: The REST API provides endpoints to duplicate projects across two environments, enabling
+ administrators to create copies of projects with customizable settings.
+---
+
+Project duplication enables administrators to duplicate projects across two environments for the same MD type (PostgreSQL to PostgreSQL) directly using REST APIs, replacing the need for legacy tools like Object Manager, Developer.
+
+:::warning
+
+These project duplication APIs do not work when [User Fencing](https://www2.microstrategy.com/producthelp/current/SystemAdmin/WebHelp/Lang_1033/content/Work_Fences.htm) is enabled. Please ensure that User Fencing is disabled in the Library.
+
+:::
+
+## APIs
+
+- [POST /api/projectDuplications](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/createDuplication)
+- [PUT /api/projectDuplications/\{id}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/createDuplicationOnTarget)
+- [GET /api/projectDuplications/\{id}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/getProjectDuplication)
+- [GET /api/projectDuplications](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/getProjectDuplications)
+- [PUT /api/projectDuplications/\{id}/status](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/cancelDuplication)
+- [GET /api/projectDuplications/\{id}/backup](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/getProjectDuplicationFiles)
+- [POST /api/projectDuplications/restoration](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/triggerDuplicationByPackage)
+- [DELETE /api/projectDuplications/\{id}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/deleteDuplication)
+
+## Privileges and authorization
+
+You need the following privileges to use the project duplication functionality:
+
+- [DssXmlPrivilegesDuplicateProject](https://www2.microstrategy.com/producthelp/Current/WebAPIReference/com/microstrategy/webapi/EnumDSSXMLPrivilegeTypes.html#DssXmlPrivilegesDuplicateProject) and [DssXmlPrivilegesBypassAccessChecks](https://www2.microstrategy.com/producthelp/Current/WebAPIReference/com/microstrategy/webapi/EnumDSSXMLPrivilegeTypes.html#DssXmlPrivilegesBypassAccessChecks) privilege on the duplicated project
+
+To execute the API, you must get the authorization token by executing the `POST /api/auth/login`
+request, and get a token as `X-MSTR-AuthToken` in the response header. Keep the token value. It is
+required to execute the REST API. See [Authentication](/docs/getting-started/authentication.md) for
+more information.
+
+## General workflow
+
+The general workflow for using the project duplication APIs involves:
+
+1. [Initiate project duplication on source environment](#initiate-project-duplication-on-source-environment)
+1. [Initiate project duplication on target environment](#initiate-project-duplication-on-target-environment)
+1. [Check duplication status](#check-duplication-status)
+1. [List all project duplications](#list-all-project-duplications)
+1. [Cancel project duplication](#cancel-project-duplication)
+1. [Download project duplication package file](#download-project-duplication-package-file)
+1. [Restore project duplication with package file](#restore-project-duplication-with-package-file)
+
+### Initiate project duplication on source environment
+
+Use `POST /api/projectDuplications` to start a project duplication operation on source environment. This initiates an asynchronous process
+that creates a duplicate of the source project with the settings you specify. The duplicated project will be synced with the target environment.
+
+For cross environment project duplication, `source.environment.id` and `target.environment.id` in the request body should be different.
+
+#### Step 1: Create the duplication request on source environment
+
+Sample Request Header:
+
+```http
+Content-Type: application/json
+X-MSTR-AuthToken:
+Prefer: respond-async
+X-MSTR-ProjectID:
+```
+
+:::tip The `Prefer: respond-async` header instructs the server to process the duplication asynchronously without waiting for completion.
+:::
+
+Sample Request Body:
+
+:::important For cross environment project duplication, `source.environment.id` and `target.environment.id` in the request body should be different.
+:::
+
+```json
+{
+ "source": {
+ "environment": {
+ "id": "http://example1.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example2.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "name": "Target Project"
+ }
+ },
+ "settings": {
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [1033, 2052],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 29,
+ "rule": 2
+ },
+ {
+ "type": 44,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ },
+ "export": {
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 34,
+ "rule": 2
+ }
+ ],
+ "objects": ["95A868464F2F105205B2848BBCB81C50", "4E70890241DBB18E6CA1D8B850952A68"],
+ "includeAllUserGroups": false
+ }
+ }
+ }
+}
+```
+
+Sample Curl:
+
+```bash
+curl -X POST "https://example1.com/MicroStrategyLibrary/api/projectDuplications" \
+ -H "Content-Type: application/json" \
+ -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa" \
+ -H "Prefer: respond-async" \
+ -H "X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754" \
+ -d '{
+ "source": {
+ "environment": {
+ "id": "http://example1.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example2.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "name": "Target Project"
+ }
+ },
+"settings": {
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [1033, 2052],
+ "configurationObjects": {
+ "conflictRules":[
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 29,
+ "rule": 2
+ },
+ {
+ "type": 44,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ },
+ "export": {
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 34,
+ "rule": 2
+ }
+ ],
+ "objects": [
+ "95A868464F2F105205B2848BBCB81C50",
+ "4E70890241DBB18E6CA1D8B850952A68"
+ ],
+ "includeAllUserGroups": false
+ }
+ }
+ }
+}'
+```
+
+Sample Response Code: 201 (Created)
+
+Sample Response Body:
+
+```json
+{
+ "id": "F8F1280022A444C5A10B3445B552E33A",
+ "source": {
+ "environment": {
+ "id": "http://example1.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example2.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "id": "B0D8B3CC70854505A1576DBBE26C4B8B",
+ "name": "Target Project"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "createdDate": "2025-05-20T02:30:24.632+0000",
+ "lastUpdatedDate": "2025-05-20T02:34:57.748+0000",
+ "status": "exporting",
+ "progress": 0,
+ "message": "",
+ "settings": {
+ "export": {
+ "projectObjectsPreference": {
+ "schemaObjectsOnly": false,
+ "skipEmptyProfileFolders": false
+ },
+ "subscriptionPreferences": {
+ "includeUserSubscriptions": false,
+ "includeContactSubscriptions": false
+ },
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 34,
+ "rule": 2
+ },
+ {
+ "type": 5,
+ "rule": 1
+ }
+ ],
+ "objects": ["95A868464F2F105205B2848BBCB81C50", "4E70890241DBB18E6CA1D8B850952A68"],
+ "includeAllUserGroups": false
+ }
+ },
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [1033, 2052],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 44,
+ "rule": 2
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 29,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ }
+ }
+}
+```
+
+:::note The duplication process is executed asynchronously. The response includes a unique `id` that you can use to check the status of the operation using the `GET /api/projectDuplications/{id}` endpoint.
+:::
+
+### Initiate project duplication on target environment
+
+Before initiating project duplication on target environment, call `POST /api/projectDuplications` to start a project duplication operation on source environment and get the project duplication ID in the response body.
+
+On target environment, use `PUT /projectDuplications/{id}` with the project duplication ID to initiate an asynchronous process that creates a duplicate of the project with the settings you specify. The duplicated project will be synced from the source environment.
+
+#### Step 2: Create the duplication request on target environment
+
+Sample Request Header:
+
+```http
+Content-Type: application/json
+X-MSTR-AuthToken:
+Prefer: respond-async
+X-MSTR-ProjectID:
+```
+
+:::tip The `Prefer: respond-async` header instructs the server to process the duplication asynchronously without waiting for completion.
+:::
+
+Sample Request Body:
+
+:::important For cross environment project duplication, `source.environment.id` and `target.environment.id` in the request body should be different. Use the same request body as in the `POST /projectDuplications` request.
+:::
+
+```json
+{
+ "source": {
+ "environment": {
+ "id": "http://example1.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example2.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "name": "Target Project"
+ }
+ },
+ "settings": {
+ "export": {
+ "projectObjectsPreference": {
+ "schemaObjectsOnly": false,
+ "skipEmptyProfileFolders": false
+ },
+ "subscriptionPreferences": {
+ "includeUserSubscriptions": false,
+ "includeContactSubscriptions": false
+ },
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 34,
+ "rule": 2
+ },
+ {
+ "type": 5,
+ "rule": 1
+ }
+ ],
+ "objects": ["95A868464F2F105205B2848BBCB81C50", "4E70890241DBB18E6CA1D8B850952A68"],
+ "includeAllUserGroups": false
+ }
+ },
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [1033, 2052],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 44,
+ "rule": 2
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 29,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ }
+ }
+}
+```
+
+Sample Curl:
+
+```bash
+curl -X PUT "https://example2.com/MicroStrategyLibrary/api/projectDuplications/C17A7B510F8A4B74B6B19F168106921E" \
+ -H "Content-Type: application/json" \
+ -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa" \
+ -H "Prefer: respond-async" \
+ -d '{
+ "source": {
+ "environment": {
+ "id": "http://example.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "name": "Target Project"
+ }
+ },
+ "settings": {
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [
+ 1033,
+ 2052
+ ],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 44,
+ "rule": 2
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 29,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ }
+ }
+}'
+```
+
+Sample Response Code: 201 (Created)
+
+Sample Response Body:
+
+```json
+{
+ "id": "F8F1280022A444C5A10B3445B552E33A",
+ "source": {
+ "environment": {
+ "id": "http://example1.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example2.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "id": "B0D8B3CC70854505A1576DBBE26C4B8B",
+ "name": "Target Project"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "createdDate": "2025-05-20T02:30:24.632+0000",
+ "lastUpdatedDate": "2025-05-20T02:34:57.748+0000",
+ "status": "exporting",
+ "progress": 0,
+ "message": "",
+ "settings": {
+ "export": {
+ "projectObjectsPreference": {
+ "schemaObjectsOnly": false,
+ "skipEmptyProfileFolders": false
+ },
+ "subscriptionPreferences": {
+ "includeUserSubscriptions": false,
+ "includeContactSubscriptions": false
+ },
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 34,
+ "rule": 2
+ },
+ {
+ "type": 5,
+ "rule": 1
+ }
+ ],
+ "objects": ["95A868464F2F105205B2848BBCB81C50", "4E70890241DBB18E6CA1D8B850952A68"],
+ "includeAllUserGroups": false
+ }
+ },
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [1033, 2052],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 44,
+ "rule": 2
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 29,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ }
+ }
+}
+```
+
+:::note The duplication process is executed asynchronously. The response includes a unique `id` that you can use to check the status of the operation using the `GET /api/projectDuplications/{id}` endpoint.
+:::
+
+### Check duplication status
+
+Use `GET /api/projectDuplications/{id}` to check the status of a specific project duplication operation on either source environment or target environment. Since duplication is an asynchronous process, you should poll this endpoint to monitor the progress.
+
+#### Step 3: Monitor the duplication progress
+
+Sample Request Header:
+
+```http
+X-MSTR-AuthToken:
+```
+
+Sample Curl:
+
+```bash
+curl -X GET "https://demo.microstrategy.com/MicroStrategyLibrary/api/projectDuplications/F8F1280022A444C5A10B3445B552E33A" \
+ -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa"
+```
+
+Sample Response Body:
+
+```json
+{
+ "id": "F8F1280022A444C5A10B3445B552E33A",
+ "source": {
+ "environment": {
+ "id": "http://example.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "id": "B0D8B3CC70854505A1576DBBE26C4B8B",
+ "name": "Target Project"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "createdDate": "2025-05-20T02:30:24.632+0000",
+ "lastUpdatedDate": "2025-05-20T02:34:57.748+0000",
+ "status": "completed",
+ "progress": 100,
+ "message": "",
+ "settings": {
+ "export": {
+ "projectObjectsPreference": {
+ "schemaObjectsOnly": false,
+ "skipEmptyProfileFolders": false
+ },
+ "subscriptionPreferences": {
+ "includeUserSubscriptions": false,
+ "includeContactSubscriptions": false
+ },
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 34,
+ "rule": 2
+ },
+ {
+ "type": 5,
+ "rule": 1
+ }
+ ],
+ "objects": ["95A868464F2F105205B2848BBCB81C50", "4E70890241DBB18E6CA1D8B850952A68"],
+ "includeAllUserGroups": false
+ }
+ },
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [1033, 2052],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 44,
+ "rule": 2
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 29,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ }
+ }
+}
+```
+
+Sample Response Code: 200 (OK)
+
+:::info Duplication Status Values
+
+The status of project duplication on source environment may be `exporting`, `export_syncing`, `exported`, `export_failed`, `cancelled`.
+
+- exporting: Target environment is exporting the duplicated project.
+- export_syncing: Source environment is syncing the project to target environment.
+- exported: Project duplication finishes successfully on source environment.
+- export_failed: Failure occurs during project duplication on source environment.
+- cancelled: Project duplication is cancelled.
+
+The status of project duplication on target environment may be `import_syncing`, `importing`, `completed`, `import_failed`, `cancelling`, `cancelled`.
+
+- import_syncing: Target environment is syncing the project from source environment.
+- importing: Target environment is importing the duplicated project.
+- completed: Project duplication finishes successfully on target environment.
+- import_failed: Failure occurs during project duplication on target environment.
+- cancelling: Project duplication is being cancelled.
+- cancelled: Project duplication is cancelled.
+
+You should poll the status endpoint at reasonable intervals (e.g., every 10-30 seconds) until the
+status changes to `exported`, `completed`, `import_failed`, `export_failed`, or `cancelled`.
+:::
+
+### List all project duplications
+
+Use `GET /api/projectDuplications` to retrieve a list of all project duplication operations. This is useful for monitoring and managing multiple duplication tasks.
+
+#### Retrieving the duplication history
+
+Sample Request Header:
+
+```http
+X-MSTR-AuthToken:
+```
+
+Sample Curl:
+
+```bash
+curl -X GET "https://demo.microstrategy.com/MicroStrategyLibrary/api/projectDuplications?offset=0&limit=1" \
+ -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa"
+```
+
+Sample Response Body:
+
+```json
+{
+ "projectDuplications": [
+ {
+ "id": "F8F1280022A444C5A10B3445B552E33A",
+ "source": {
+ "environment": {
+ "id": "http://example.com/MicroStrategyLibrary",
+ "name": "Source Environment"
+ },
+ "project": {
+ "id": "B7CA92F04B9FAE8D941C3E9B7E0CD754",
+ "name": "Tutorial"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "target": {
+ "environment": {
+ "id": "http://example.com/MicroStrategyLibrary",
+ "name": "Target Environment"
+ },
+ "project": {
+ "id": "B0D8B3CC70854505A1576DBBE26C4B8B",
+ "name": "Target Project"
+ },
+ "creator": {
+ "id": "86A002474C1A18F1F92F2B8150A43741",
+ "name": "mstr1"
+ }
+ },
+ "createdDate": "2025-05-20T02:30:24.632+0000",
+ "lastUpdatedDate": "2025-05-20T02:34:57.748+0000",
+ "status": "completed",
+ "progress": 100,
+ "message": "",
+ "settings": {
+ "export": {
+ "projectObjectsPreference": {
+ "schemaObjectsOnly": false,
+ "skipEmptyProfileFolders": false
+ },
+ "subscriptionPreferences": {
+ "includeUserSubscriptions": false,
+ "includeContactSubscriptions": false
+ },
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 34,
+ "rule": 2
+ },
+ {
+ "type": 5,
+ "rule": 1
+ }
+ ],
+ "objects": [
+ "95A868464F2F105205B2848BBCB81C50",
+ "4E70890241DBB18E6CA1D8B850952A68"
+ ],
+ "includeAllUserGroups": false
+ }
+ },
+ "import": {
+ "description": "this is a test description",
+ "defaultLocale": 2052,
+ "locales": [
+ 1033,
+ 2052
+ ],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 44,
+ "rule": 2
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 29,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ }
+ }
+ }
+}
+```
+
+Sample Response Code: 200 (OK)
+
+:::tip You can use this endpoint to check all your past and current duplication operations. It provides a comprehensive view of all duplication tasks and their statuses.
+:::
+
+### Cancel project duplication
+
+Use `PUT /api/projectDuplications/{id}` to cancel an ongoing project duplication operation on either source environment or target environment.
+This is useful if you made a mistake or need to stop a long-running duplication task.
+
+For source environment, if the project duplication status has not been `exported`, cancelling the project duplication on source environment will also cancel any pending project duplication with the same ID on target environment.
+However, cancelling the project duplication on target environment will not cancel the same project duplication on source environment.
+
+#### Step 4: Cancel a duplication (if needed)
+
+Sample Request Header:
+
+```http
+Content-Type: application/json
+X-MSTR-AuthToken:
+```
+
+Sample Request Body:
+
+```json
+{
+ "status": "cancelled"
+}
+```
+
+Sample Curl:
+
+```bash
+curl -X PUT "https://demo.microstrategy.com/MicroStrategyLibrary/api/projectDuplications/F8F1280022A444C5A10B3445B552E33A" \
+ -H "Content-Type: application/json" \
+ -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa" \
+ -d '{
+ "status": "cancelled"
+}'
+```
+
+Sample Response Code: 204 (No Content)
+
+:::note Important limitations:
+
+- You can only cancel duplications that are in `exporting`, `exporting_syncing`, `import_syncing` or `importing` status
+- Attempting to cancel a duplication that has already completed (`exported` on source environment, `completed` on target environment), failed
+ (`export_failed`, `import_failed`), or been cancelled (`cancelled`) will result in an error
+- Once cancelled, a duplication cannot be resumed and must be initiated again if needed
+ :::
+
+### Download project duplication package file
+
+You may use `GET /api/projectDuplications/{id}/backup` to download the project duplication file. The package file can be used to restore the duplicated project on other environments with `POST /projectDuplications` API.
+
+This API can only be called on source environment and the project duplication status must already be `exported`.
+
+#### Step 5: Download project duplication package file (if needed)
+
+Sample Request Header:
+
+```http
+X-MSTR-AuthToken:
+```
+
+Sample Curl:
+
+```bash
+curl -X GET "https://demo.microstrategy.com/MicroStrategyLibrary/api/projectDuplications/F8F1280022A444C5A10B3445B552E33A/backup" \
+ -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa" \
+ -o F8F1280022A444C5A10B3445B552E33A.projdup
+```
+
+Sample Response Body: File binary
+
+Sample Response Code: 200 (OK)
+
+### Restore project duplication with package file
+
+Use `POST /api/projectDuplications/restoration` to restore a duplicated project with a project duplication package file on any environment.
+
+With this API, upload a package file you download with `GET /projectDuplications/{id}/backup` API and a new project duplication will be triggered as in target environment.
+
+#### Step 6: Restore project duplication with package file (if needed)
+
+Sample Request Header:
+
+```http
+Content-Type: multipart/form-data
+X-MSTR-AuthToken:
+```
+
+Sample Request Body:
+
+The request body must contain the form data with the following fields:
+
+| Field Name | Type | Required | Description |
+| ---------- | ------ | -------- | ------------------------------------------------------------ |
+| `file` | File | Yes | The sample file to be uploaded. |
+| `metadata` | String | Yes | A JSON string that contains the metadata of the restoration. |
+
+Sample Curl:
+
+```bash
+curl -X PUT "https://demo.microstrategy.com/MicroStrategyLibrary/api/projectDuplications/F8F1280022A444C5A10B3445B552E33A" \
+ -H "Content-Type: application/json" \
+ -H "X-MSTR-AuthToken: o0ak9privdo27nfo798j40m8aa" \
+ --form 'file=@"/your/path/to/package.projdup' \
+ --form 'metadata="{
+ \"target\": {
+ \"environment\": {
+ \"id\": \"https://demo.microstrategy.com/MicroStrategyLibrary\",
+ \"name\": \"Target environment\"
+ },
+ \"project\": {
+ \"name\": \"New project name\"
+ }
+ },
+ \"settings\": {
+ \"import\": {
+ \"description\": \"string\",
+ \"defaultLocale\": 2052,
+ \"locales\": [
+ 1033, 2052
+ ],
+ \"configurationObjects\": {
+ \"conflictRules\": [
+ {
+ \"type\": 0,
+ \"rule\": 0
+ }
+ ],
+ \"matchUsersByLogin\": true
+ }
+ }
+ }
+ }"'
+```
+
+Sample Response Code: 201 (Created)
+
+## Project duplication settings
+
+You can customize various aspects of the project duplication process using the settings in the
+request. The following sections describe the available options.
+
+### Export settings
+
+The `settings.export` object controls how the source project is exported:
+
+```json
+"settings": {
+ "export": {
+ "projectObjectsPreference": {
+ "schemaObjectsOnly": false,
+ "skipEmptyProfileFolders": false
+ },
+ "subscriptionPreferences": {
+ "includeUserSubscriptions": false,
+ "includeContactSubscriptions": false
+ },
+ "configurationObjects": {
+ "rules": [
+ {
+ "type": 34,
+ "rule": 2
+ },
+ {
+ "type": 5,
+ "rule": 1
+ }
+ ],
+ "objects": [
+ "95A868464F2F105205B2848BBCB81C50",
+ "4E70890241DBB18E6CA1D8B850952A68"
+ ],
+ "includeAllUserGroups": false
+ }
+ }
+}
+```
+
+`settings.export.configurationObjects` is set for the export configuration objects (only used for cross environment project duplication).
+`settings.export.configurationObjects.rules` is set for the rules to select which configuration objects to duplicate. Rules are used in combination with type, indicating which rule applies to a specific object type.
+
+`settings.export.configurationObjects.rules.rule` There are four types of rules:
+
+- 0 (none): Do not duplicate configuration objects of this type.
+
+- 1 (project-related): Duplicate only the configuration objects of this type that are related to the source project.
+
+- 2 (selected): Duplicate only the configuration objects of this type that are listed in the array `settings.export.configurationObjects.objects`.
+
+- 3 (all): Duplicate all configuration objects of this type.
+
+`settings.export.configurationObjects.rules.type` Currently, the object types for which rules can be applied are limited to two: 5 and 34.
+
+- 5 represents the default, which applies to all configuration objects.
+
+- 34 represents users.
+
+Rules set on type 34 have a higher priority than those set on the type 5 default.
+
+For example, if a user sets `settings.export.configurationObjects.rules.rule` to 3 (all) on `settings.export.configurationObjects.rules.type` to 34 and `settings.export.configurationObjects.rules.rule` to 1 (related) on `settings.export.configurationObjects.rules.type` to 5, the I-Server will duplicate all user objects and all other configuration objects related to the source project.
+
+To prevent broken objects after duplication, the `settings.export.configurationObjects.rules.type` 5 (default) only supports `settings.export.configurationObjects.rules.rule` 1 (project-related) and 3 (all).
+
+For example, if we set `settings.export.configurationObjects.rules.rule` to 0 (none) on `settings.export.configurationObjects.rules.type` to 34, and `settings.export.configurationObjects.includeAllUserGroups` to true, the I-Server will duplicate the complete user group structure but will not include any user objects.
+
+### Import settings
+
+The `settings.import` object controls how the project is imported to the target environment:
+
+```json
+"settings": {
+ "import": {
+ "description": "Development copy of production project",
+ "defaultLocale": 2052,
+ "locales": [1033, 2052],
+ "configurationObjects": {
+ "conflictRules": [
+ {
+ "type": 44,
+ "rule": 2
+ },
+ {
+ "type": 34,
+ "rule": 6
+ },
+ {
+ "type": 5,
+ "rule": 1
+ },
+ {
+ "type": 29,
+ "rule": 2
+ }
+ ],
+ "matchUsersByLogin": false
+ }
+ }
+}
+```
+
+`settings.import.configurationObjects` is set for the import configuration objects (only used for cross environment project duplication).
+`settings.import.configurationObjects.matchUsersByLogin` matchUsersByLogin: This field determines how to handle cases where there are two user objects with the same login but different IDs in the source MD and target MD.
+
+If matchUsersByLogin is false: Both user objects are retained, and the login of the user object from the source MD is modified to avoid duplication.
+
+If matchUsersByLogin is true: The ID of the user object from the source MD is changed to match the user object in the target MD. Then, further processing is performed based on the configured conflict rule.
+
+`settings.import.configurationObjects.conflictRules` This field specifies which rule to apply when a conflict occurs during duplication for a specific type of configuration object. A conflict means there are configuration objects with the same ID and type in both the source MD (metadata) and the target MD.
+
+`settings.import.configurationObjects.conflictRules.rule` Currently, we support three conflict rules:
+
+- 1 (Use-existing): Ignore the object in the source MD and retain the object with the same ID in the target MD.
+
+- 2 (Replace): Overwrite the object in the target MD with the object from the source MD.
+
+- 6 (Merge): Applicable only to user and securityRole objects. If the merge rule is set for other types of objects, it will fall back to use-existing.
+
+`settings.import.configurationObjects.conflictRules.type` Currently, we support all [object types](https://www2.microstrategy.com/producthelp/Current/ReferenceFiles/reference/com/microstrategy/webapi/EnumDSSXMLObjectTypes.html).
+
+## Request fields reference
+
+The following table describes the fields available in the project duplication request:
+
+| Field | Type | Description | Required |
+| --------------------------------------------------------------------- | ------- | -------------------------------------------------------------------------- | -------- |
+| `source.environment.id` | String | URL of the source environment (must be identical to target.environment.id) | Yes |
+| `source.environment.name` | String | Name of the source environment | Yes |
+| `source.project.id` | String | ID of the source project | Yes |
+| `source.project.name` | String | Name of the source project | Yes |
+| `target.environment.id` | String | URL of the target environment (must be identical to source.environment.id) | Yes |
+| `target.environment.name` | String | Name of the target environment | Yes |
+| `target.project.name` | String | Name to assign to the duplicated project | Yes |
+| `settings.import.description` | String | Description for the duplicated project | No |
+| `settings.import.defaultLocale` | Number | Default locale ID for the duplicated project | No |
+| `settings.import.locales` | Array | List of locale IDs to include in the duplicated project | No |
+| `settings.import.configurationObjects` | Object | Configuration objects for the duplicated project | No |
+| `settings.import.configurationObjects.matchUsersByLogin` | Boolean | Whether to match users by login | No |
+| `settings.import.configurationObjects.conflictRules` | Array | Rules to resolve conflicts when importing configuration objects | No |
+| `settings.import.configurationObjects.objects` | Array | List of configuration objects to import | No |
+| `settings.import.configurationObjects.includeAllUserGroups` | Boolean | Whether to include all user groups | No |
+| `settings.export.projectObjectsPreference.schemaObjectsOnly` | Boolean | Whether to include only schema objects | No |
+| `settings.export.projectObjectsPreference.skipEmptyProfileFolders` | Boolean | Whether to skip empty profile folders | No |
+| `settings.export.subscriptionPreferences.includeUserSubscriptions` | Boolean | Whether to include user subscriptions | No |
+| `settings.export.subscriptionPreferences.includeContactSubscriptions` | Boolean | Whether to include contact subscriptions | No |
+| `settings.export.configurationObjects` | Object | Configuration objects for the duplicated project | No |
+| `settings.export.configurationObjects.rules` | Array | Rules to select which configuration objects to duplicate | No |
+| `settings.export.configurationObjects.objects` | Array | List of configuration objects to duplicate | No |
+| `settings.export.configurationObjects.includeAllUserGroups` | Boolean | Whether to include all user groups | No |
+
+## Response fields reference
+
+The following table describes the fields available in the project duplication response:
+
+| Field | Type | Description |
+| -------------------- | ------ | ---------------------------------------------------------- |
+| `id` | String | Unique identifier for the duplication operation |
+| `source` | Object | Information about the source project and environment |
+| `source.environment` | Object | Details about the source environment |
+| `source.project` | Object | Details about the source project |
+| `source.creator` | Object | Details about the user who created the source project |
+| `target` | Object | Information about the target project and environment |
+| `target.environment` | Object | Details about the target environment |
+| `target.project` | Object | Details about the target project |
+| `target.creator` | Object | Details about the user who created the target project |
+| `createdDate` | String | ISO datetime when the duplication was initiated |
+| `lastUpdatedDate` | String | ISO datetime when the duplication was last updated |
+| `status` | String | Current status of the duplication operation |
+| `progress` | Number | Completion percentage of the duplication operation (0-100) |
+| `message` | String | Additional information or error message |
+| `settings` | Object | Configuration settings used for the duplication operation |
+
+## Common errors and troubleshooting
+
+| HTTP Status | Error Code | Description | Resolution |
+| ----------- | --------------------- | ---------------------------------- | ------------------------------------------------------------------------------- |
+| 400 | INVALID_REQUEST | Request body is not valid | Check the request JSON format and required fields |
+| 403 | FORBIDDEN | User lacks sufficient privileges | Ensure the user has administrator privileges on both source and target projects |
+| 404 | PROJECT_NOT_FOUND | Source project not found | Verify the source project ID is correct |
+| 409 | PROJECT_NAME_EXISTS | Target project name already exists | Choose a different name for the target project |
+| 500 | INTERNAL_SERVER_ERROR | Internal server error occurred | Check server logs for details and retry the operation |
+
+## Best practices
+
+1. **Plan for downtime**: Project duplication operations can be resource-intensive. Schedule them
+ during off-peak hours if possible.
+
+1. **Use descriptive names**: Give your duplicated projects clear, descriptive names that indicate
+ their purpose (e.g., "Sales_Dev", "Marketing_Test").
+
+1. **Monitor progress**: Large projects may take considerable time to duplicate. Use the status
+ field to monitor progress.
+
+1. **Testing**: Test the duplication process with a small project before attempting to duplicate
+ large, complex projects.
diff --git a/docs/common-workflows/administration/project-duplication/project-duplication.md b/docs/common-workflows/administration/project-duplication/project-duplication.md
index 8a7c2354..6fac87cd 100644
--- a/docs/common-workflows/administration/project-duplication/project-duplication.md
+++ b/docs/common-workflows/administration/project-duplication/project-duplication.md
@@ -1,18 +1,25 @@
---
-sidebar_label: Project Duplication
-title: Project Duplication
+sidebar_label: Project Duplication (Same Environment)
+title: Project Duplication (Same Environment)
description: The REST API provides endpoints to duplicate projects within same environment, enabling
administrators to create copies of projects with customizable settings.
---
Project duplication enables administrators to duplicate projects within the same environment for the same MD type (PostgreSQL to PostgreSQL) directly using REST APIs, replacing the need for legacy tools like Object Manager, Developer.
+:::warning
+
+These project duplication APIs do not work when [User Fencing](https://www2.microstrategy.com/producthelp/current/SystemAdmin/WebHelp/Lang_1033/content/Work_Fences.htm) is enabled. Please ensure that User Fencing is disabled in the Library.
+
+:::
+
## APIs
- [POST /api/projectDuplications](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/createDuplication)
- [GET /api/projectDuplications/\{id}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/getProjectDuplication)
- [GET /api/projectDuplications](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/getProjectDuplications)
- [PUT /api/projectDuplications/\{id}/status](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/cancelDuplication)
+- [DELETE /api/projectDuplications/\{id}](https://demo.microstrategy.com/MicroStrategyLibrary/api-docs/index.html#/Project%20Duplications/deleteDuplication)
## Privileges and authorization
@@ -498,14 +505,13 @@ The following table describes the fields available in the project duplication re
## Common errors and troubleshooting
-| HTTP Status | Error Code | Description | Resolution |
-| ----------- | ---------------------- | ----------------------------------------------- | ------------------------------------------------------------------------------- |
-| 400 | DIFFERENT_ENVIRONMENTS | Source and target environments are not the same | Ensure source.environment.id and target.environment.id are identical |
-| 400 | INVALID_REQUEST | Request body is not valid | Check the request JSON format and required fields |
-| 403 | FORBIDDEN | User lacks sufficient privileges | Ensure the user has administrator privileges on both source and target projects |
-| 404 | PROJECT_NOT_FOUND | Source project not found | Verify the source project ID is correct |
-| 409 | PROJECT_NAME_EXISTS | Target project name already exists | Choose a different name for the target project |
-| 500 | INTERNAL_SERVER_ERROR | Internal server error occurred | Check server logs for details and retry the operation |
+| HTTP Status | Error Code | Description | Resolution |
+| ----------- | --------------------- | ---------------------------------- | ------------------------------------------------------------------------------- |
+| 400 | INVALID_REQUEST | Request body is not valid | Check the request JSON format and required fields |
+| 403 | FORBIDDEN | User lacks sufficient privileges | Ensure the user has administrator privileges on both source and target projects |
+| 404 | PROJECT_NOT_FOUND | Source project not found | Verify the source project ID is correct |
+| 409 | PROJECT_NAME_EXISTS | Target project name already exists | Choose a different name for the target project |
+| 500 | INTERNAL_SERVER_ERROR | Internal server error occurred | Check server logs for details and retry the operation |
## Best practices
diff --git a/docs/common-workflows/analytics/auto-bot-api/auto-bot-api.md b/docs/common-workflows/analytics/auto-bot-api/auto-bot-api.md
index 712de78b..8ca1777d 100644
--- a/docs/common-workflows/analytics/auto-bot-api/auto-bot-api.md
+++ b/docs/common-workflows/analytics/auto-bot-api/auto-bot-api.md
@@ -18,6 +18,7 @@ Starting from Strategy ONE (June 2025), we've added support for retrieving image
- **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))
For further details on how to use these APIs, please refer to the following sections of this manual:
@@ -26,3 +27,4 @@ For further details on how to use these APIs, please refer to the following sect
- [Get chat history from a specific bot](./get-questions-by-bot.md)
- [Get suggested questions from a specific bot](./post-suggestion.md)
- [Get image from an answer](./get-image-of-answer.md)
+- [Get attributes and metrics from a specific bot](./get-columns.md)
diff --git a/docs/common-workflows/analytics/auto-bot-api/get-columns.md b/docs/common-workflows/analytics/auto-bot-api/get-columns.md
new file mode 100644
index 00000000..ca496811
--- /dev/null
+++ b/docs/common-workflows/analytics/auto-bot-api/get-columns.md
@@ -0,0 +1,66 @@
+---
+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.
+---
+
+
+
+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.
+
+:::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
+
+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 |
+| X-MSTR-AuthToken | header | Authentication token | Yes | string |
+| X-MSTR-ProjectID | header | Project ID | Yes | string |
+
+Sample Curl:
+
+```bash
+# Replace with your actual values
+curl 'GET https://demo.microstrategy.com/MicroStrategyLibrary/api/v2/bots/4B7EF8B549D2D32E941C3E9B7E0CD754/columns' \
+-H 'X-MSTR-AuthToken: pqu5mkrcbv4461hh5qprr9j5ve' \
+-H 'X-MSTR-ProjectID: B7CA92F04B9FAE8D941C3E9B7E0CD754' \
+-H 'Content-Type: application/json'
+```
+
+Sample Response:
+
+```json
+{
+ "id": "8D679D4B11D3E4981000E787EC6DE8A4",
+ "columns": ["Customer(ID)", "Customer(Name)", "Revenue"]
+}
+```
+
+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.
+
+## 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. 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.
+
+Example implementation:
+
+- Cache the column information at application startup or when a bot 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
diff --git a/docs/common-workflows/analytics/auto-bot-api/get-question-by-id.md b/docs/common-workflows/analytics/auto-bot-api/get-question-by-id.md
index 911e0d70..1789c891 100644
--- a/docs/common-workflows/analytics/auto-bot-api/get-question-by-id.md
+++ b/docs/common-workflows/analytics/auto-bot-api/get-question-by-id.md
@@ -56,7 +56,7 @@ If the question is being processed, the response is:
```json
{
"id": "9161386651E84054A6230796C84E12C5:68696ADB633946B4B430ABD959433B3B:FCC1C28296014AB19ABD877E60590890",
- "text": "Analyze the distribution of cooking times for recipes",
+ "text": "What was the Number of Flights for AirTran Airways Corporation in July 2010?",
"answers": [],
"creationDate": "2024-03-08T09:01:43.154+0000"
}
@@ -69,11 +69,12 @@ If the status code is 200, indicating that the question has been answered.
```json
{
"id": "9161386651E84054A6230796C84E12C5:68696ADB633946B4B430ABD959433B3B:FCC1C28296014AB19ABD877E60590890",
- "text": "Analyze the distribution of cooking times for recipes",
+ "text": "What was the Number of Flights for AirTran Airways Corporation in July 2010?",
"answers": [
{
"bot": { "id": "68696ADB633946B4B430ABD959433B3B" },
- "text": "#Title 1\nThe distribution of cooking times for recipes is as follows:\n- The shortest cooking time is -1 minute.\n- The majority of recipes have cooking times ranging from 2 to 60 minutes.\n- There are a few recipes with longer cooking times, such as 75, 90, 120, and 720 minutes.\n- The exact distribution of cooking times can be seen in the visualization result.",
+ "text": "**The Number of Flights for AirTran Airways Corporation in July 2010 was 2260.**",
+ "insights": "- \uD83D\uDE0A **July is often a peak travel month, so seeing a high number of flights is typical for airlines during this period.**\n- ✈️ **A total of 2260 flights in one month indicates strong operational capacity and demand for AirTran Airways Corporation at that time.**\n- \uD83D\uDCC8 **Tracking monthly flight numbers can help identify seasonal trends and inform future scheduling or marketing strategies.**",
"images": [{ "id": "79FD176AEAD9446395B083B5931E9EC7", "width": 800, "height": 600 }],
"route": "sql"
}
diff --git a/docs/whats-new.md b/docs/whats-new.md
index f31bb7b8..d3e37eca 100644
--- a/docs/whats-new.md
+++ b/docs/whats-new.md
@@ -4,6 +4,11 @@ sidebar_label: What's new
Description: What's New in the REST API.
---
+## Strategy ONE (July 2025)
+
+- [Project duplication across environments](common-workflows/administration/project-duplication/cross-env-project-duplication.md). Duplicate a project across two environments.
+- [Get attributes forms and metrics from a specific bot](common-workflows/analytics/auto-bot-api/get-columns.md). Fetch the column information (attributes and metrics) from a specific bot, which can be used for auto-complete functionality in user inputs.
+
## Strategy ONE (June 2025)
- [Next-Gen AI Image Support](common-workflows/analytics/auto-bot-api/auto-bot-api.md). Request and retrieve images in answer from Next-Gen AI.
diff --git a/sidebars.js b/sidebars.js
index 98b1eef7..a458ed74 100644
--- a/sidebars.js
+++ b/sidebars.js
@@ -423,6 +423,7 @@ const sidebars = {
"common-workflows/analytics/auto-bot-api/get-questions-by-bot",
"common-workflows/analytics/auto-bot-api/post-suggestion",
"common-workflows/analytics/auto-bot-api/get-image-of-answer",
+ "common-workflows/analytics/auto-bot-api/get-columns",
],
},
{
@@ -1079,7 +1080,10 @@ const sidebars = {
id: "common-workflows/administration/project-duplication/project-duplication",
},
label: "Project Duplication",
- items: ["common-workflows/administration/project-duplication/project-duplication"],
+ items: [
+ "common-workflows/administration/project-duplication/project-duplication",
+ "common-workflows/administration/project-duplication/cross-env-project-duplication",
+ ],
},
],
},