This guide walks you through using the CloudM Migrate REST API to programmatically manage migration projects. The API covers the full migration lifecycle: authentication, connections, projects, batches, migration execution, and monitoring.
API Documentation
Interactive API documentation is available in your Migrate instance at:
https://<your-migrate-server>/scalar/v1
The OpenAPI specification is available at:
https://<your-migrate-server>/openapi/v1.json
Authentication
The API uses JWT bearer tokens. All requests (except login) require an Authorization header.
1. Log in
POST /api/Account/login
Content-Type: application/json
{
"userEmail": "admin@example.com",
"password": "your-password"
}
Response:
{
"userId": "abc-123",
"userName": "Admin User",
"email": "admin@example.com",
"role": "Admin",
"accessToken": "eyJhbGciOiJIUzI1NiIs...",
"expiresIn": 900,
"passwordResetRequired": false
}
2. Use the token
Include the accessToken in all subsequent requests:
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
Access tokens expire after 15 minutes by default.
Core Workflow
The API follows the same workflow as the UI: create connections, test them, create a project, create a batch, add users, and start the migration.
Step 1 — Create Connections
Each platform has its own endpoint. For example, to create a Microsoft 365 source connection:
POST /api/Microsoft365Connections
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Contoso M365 Source",
"connectionType": "Source",
"settings": {
// Platform-specific settings
}
}
And a Google Workspace destination:
POST /api/GoogleWorkspaceConnections
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Contoso Google Dest",
"connectionType": "Destination",
"settings": {
// Platform-specific settings
}
}
Supported platform endpoints:
| Platform | Endpoint |
|---|---|
| Microsoft 365 | api/Microsoft365Connections |
| Microsoft 365 Online Archive | api/Microsoft365OnlineArchiveConnections |
| Google Workspace | api/GoogleWorkspaceConnections |
| Google Vault | api/GoogleVaultConnections |
| Google Takeout | api/GoogleTakeoutConnections |
| Exchange (on-premises) | api/ExchangeConnections |
| Hosted Microsoft Exchange | api/HostedMicrosoftExchangeConnections |
| SharePoint | api/SharePointConnections |
| Box | api/BoxConnections |
| Dropbox | api/DropboxConnections |
| Amazon S3 | api/AmazonStorageConnections |
| Azure Storage | api/AzureStorageConnections |
| File System | api/FileSystemConnections |
| IMAP | api/IMAPConnections |
| PST Archive | api/PstArchiveConnections |
| Zimbra | api/ZimbraConnections |
Each connection endpoint supports POST (create), PUT (update), and GET (retrieve).
Tip: Use the Scalar API reference (/scalar/v1) to see the exact settings fields required for each platform.
Step 2 — Test Connections
Before creating a project, verify your connections work:
POST /api/TestConnection/start
Authorization: Bearer <token>
Content-Type: application/json
{
"platformConnectionId": 1
}
Response:
{
"testId": "abc-123"
}
Poll for the result:
GET /api/TestConnection/{testId}
Authorization: Bearer <token>
Response:
{
"completed": true,
"testNotFound": false
}
Step 3 — Create a Project
POST /api/ConnectionsProject/create-project
Authorization: Bearer <token>
Content-Type: application/json
{
"name": "Contoso Migration",
"sourceConnectionId": 1,
"destinationConnectionId": 2
}
Response:
{
"projectId": "a1b2c3d4-...",
"name": "Contoso Migration",
"createdOn": "2026-05-06T10:00:00Z",
"isArchived": false,
"isIncomplete": false,
"sourceConnectionId": 1,
"destinationConnectionId": 2
}
Step 4 — Create a Batch
POST /api/ConnectionBatches/create-connection-batch
Authorization: Bearer <token>
Content-Type: application/json
{
"projectId": "a1b2c3d4-...",
"batchName": "Batch 1 - Executives",
"sourceConnectionId": 1,
"destinationConnectionId": 2,
"migrationItemsBatchType": 0,
"tags": ""
}
Returns a configurationId (GUID) that you'll use for all subsequent batch operations.
Step 5 — Add Migration Items
Add users to the batch individually:
POST /api/BatchMigrationItems/add-migration-item
Authorization: Bearer <token>
Content-Type: application/json
{
"configurationId": "config-guid-...",
"exportName": "user@contoso.com",
"importName": "user@contoso.com",
"exportType": 0,
"importType": 0,
"mail": true,
"calendar": true,
"contacts": true,
"drive": true,
"migrate": true
}
Or import in bulk:
POST /api/BatchMigrationItems/import-users-from-file POST /api/BatchMigrationItems/import-users-from-source
Step 6 — Configure Settings (Optional)
Retrieve the current settings for a batch:
GET /api/BatchConfigSettings/{configurationId}
Authorization: Bearer <token>
Update settings:
POST /api/BatchConfigSettings/save-general-settings POST /api/BatchConfigSettings/save-source-settings POST /api/BatchConfigSettings/save-destination-settings
Step 7 — Start Migration
POST /api/ConnectionBatchesProgress/start-migration
Authorization: Bearer <token>
Content-Type: application/json
{
"configurationId": "config-guid-...",
"mode": "StartMigration"
}
Migration modes:
| Mode | Description |
|---|---|
| StartMigration | Start or resume the migration |
| CheckUsersOnly | Validate users without migrating data |
| RestartFailedUsers | Retry all failed users |
| RestartFailedItems | Retry all failed items |
Step 8 — Monitor Progress
GET /api/ConnectionBatchesProgress/get-statistics?configurationId=config-guid-... Authorization: Bearer <token>
Returns total migration statistics, per-item statistics, and volume cap information.
Step 9 — Stop Migration
POST /api/ConnectionBatchesProgress/stop-migration
Authorization: Bearer <token>
Content-Type: application/json
{
"configurationId": "config-guid-..."
}
Step 10 — Generate and Download Reports
POST /api/ConnectionBatchesProgress/generate-report
Authorization: Bearer <token>
Content-Type: application/json
{
"configurationId": "config-guid-..."
}
GET /api/ConnectionBatchesProgress/download-report?configurationId=config-guid-...&reportType=... Authorization: Bearer <token>
Other Endpoints
Beyond the core migration workflow, the API also provides:
| Endpoint | Purpose |
|---|---|
api/ScheduleMigration | Schedule migrations by date, on completion of another batch, or at a percentage threshold |
api/EnvironmentScan | Start/stop environment scans and retrieve reports |
api/MigrationReadiness | Pre-migration readiness checks |
api/DomainReplacement | Manage domain replacement CSV mappings |
api/AdminAudit | Query audit logs |
api/AdminUser | User management (list, add, update, delete) |
api/License | View license information per project |
api/Notification | In-app notifications |
api/ServiceManager | Manage migration service fleet |
api/ConnectionsProject | List, rename, archive, restore, and delete projects |
Tips
- Use the Scalar reference at /scalar/v1 to explore all endpoints interactively and see the exact request/response schemas for your version.
- Platform-specific settings vary significantly between connection types. Use GET on an existing connection to see the settings structure before building create/update requests.
- Pagination — list endpoints that return large datasets support pagination parameters.
- Error responses follow standard HTTP status codes with JSON error details in the response body.