Migration API Documentation
1. Create Migration
POST /createMigration
Creates a new migration plan by uploading dashboards, workflows, custom scripts, or data models.
Request Body (application/json)
{
"title": "MigratioPlan19",
"description": "",
"uploadedFile": {
"dashboardList": [
{ "id": "291e19f9-40e8-4b00-8a53-ba65e0bb17ae", "name": "MigrationReport" },
{ "id": "811f9ca1-bd9b-4f41-9282-7b55543c62ec", "name": "cschartMigSales" }
],
"workflowList": [],
"customScriptList": [
{ "id": "77c423b3-b680-4094-ac22-0b4dac2ae7de", "name": "csmigchartsales" }
],
"dataModelList": []
},
"fileName": "MigratioPlan19_1755589802034",
"obj": "{\"type\":\"migration\",\"fileName\":\"MigratioPlan19\"}"
}
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| title | string | Yes | Migration plan title |
| description | string | No | Description of the migration |
| uploadedFile | object | Yes | Lists of dashboards, workflows, custom scripts, and data models |
| fileName | string | Yes | Name for the migration file |
| obj | string | No | Additional migration metadata (optional) |
Success Response
Status: 200 OK
Content-Type: application/json
{
"id": "1f9d5b04-284f-4bc3-9e05-f1808ed3dcdc",
"url": "https://your-bucket-url/migration/1f9d5b04-284f-4bc3-9e05-f1808ed3dcdc.zip"
}
Error Handling
- 400 Bad Request – Missing required fields (title, uploadedFile, userId, clientId, etc.)
- 400 Bad Request – No dashboards, workflows, custom scripts, or data models provided
- 400 Bad Request – Invalid or empty title
2. Import Migration Data
POST /importMigrationData
Imports migration data from a zip file into the selected project and environment, using a crosswalk configuration.
Request (multipart/form-data)
| Name | Type | Required | Description |
|---|---|---|---|
| file | file (binary) | Yes | Migration zip file |
| selectedMigrationPlan | string | No | Path or ID of the migration plan (optional) |
| projectId | integer | Yes | Target project ID |
| crossWalkId | string (UUID) | Yes | Crosswalk configuration ID |
| createAsNew | boolean | No | If true, creates new entities instead of overwriting |
| overwrite | boolean | No | If true, overwrites existing data |
| notes | string | No | Optional notes for the import log |
Example Request
file: (binary) selectedMigrationPlan: "" projectId: 214 crossWalkId: 24358c9c-1bc5-4b35-9213-156e2d6d2d7d createAsNew: true overwrite: false notes: undefined
Success Response
Status: 200 OK
Content-Type: application/json
{
"status": "success",
"message": "Data imported successfully"
}
Error Handling
- 400 Bad Request – Missing required fields (file, projectId, crossWalkId, userId, clientId, etc.)
- 400 Bad Request – Import failed or invalid migration plan
3. Get File URL Based on Migration ID
GET /getFileUrlBasedOnMigrationID/:migrationId
Downloads the migration file (zip) for a given migration plan ID.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| migrationId | string (UUID) | Yes | Migration plan unique identifier |
Example Request
GET http://localhost:3001/getFileUrlBasedOnMigrationID/1f9d5b04-284f-4bc3-9e05-f1808ed3dcdc
Success Response
Status: 200 OK Content-Type: application/octet-stream; charset=UTF-8 Content-Disposition: attachment; filename=1f9d5b04-284f-4bc3-9e05-f1808ed3dcdc.zip (binary zip file content)
Note: The response is a binary zip file. If you open it in a tool like Postman, you will see the raw binary content (as shown in your screenshot). The file contains the exported dashboards, custom scripts, etc., as .rpt or .cst files inside the zip.
Error Handling
- 400 Bad Request – Invalid or missing migrationId
- 400 Bad Request – Migration file not found
