Starts a migration task.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes StartMigration

The operation that you want to perform. Set the value to StartMigration.

RegionId String Yes cn-shanghai-finance-1

The region ID. For example, the ID of the China (Shanghai) region is cn-shanghai, and that of the China (Zhangjiakou) region is cn-zhangjiakou. The system determines the value of this parameter based on the endpoint that is used to call the operation.

ProjectId Long Yes 123456

The ID of the workspace. You can go to the Workspace Management page of the DataWorks console to view the ID.

MigrationId Long Yes 123456

The ID of the migration package. You can call the CreateImportMigration operation to obtain the ID of the import package and call the CreateExportMigration operation to obtain the ID of the export package.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code returned.

Data Boolean true

Indicates whether the migration task is started. Valid values:

  • true: The migration task is started.
  • false: The migration task fails to be started.
ErrorMessage String test error msg

The error message returned.

RequestId String FSDFSDF-WERWER-XVCX-DSFSDF

The ID of the request.

ErrorCode String 110001123445

The error code returned.

Success Boolean true

Indicates whether the request was successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=StartMigration
&ProjectId=123456
&MigrationId=123456
&<Common request parameters>

Sample success responses

XML format

HTTP/1.1 200 OK
Content-Type:application/xml

<StartMigrationResponse>
    <HttpStatusCode>200</HttpStatusCode>
    <Data>true</Data>
    <ErrorMessage>test error msg</ErrorMessage>
    <RequestId>FSDFSDF-WERWER-XVCX-DSFSDF</RequestId>
    <ErrorCode>110001123445</ErrorCode>
    <Success>true</Success>
</StartMigrationResponse>

JSON format

HTTP/1.1 200 OK
Content-Type:application/json

{
  "HttpStatusCode" : 200,
  "Data" : true,
  "ErrorMessage" : "test error msg",
  "RequestId" : "FSDFSDF-WERWER-XVCX-DSFSDF",
  "ErrorCode" : 110001123445,
  "Success" : true
}

Error codes

For a list of error codes, visit the API Error Center.