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.

MigrationId Long Yes 123456

The ID of the migration package. You can call the CreateImportMigration operation to query the ID.

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.

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 automatically determines the value of this parameter based on the endpoint used to call the operation.

Response parameters

Parameter Type Example Description
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.
ErrorCode String 110001123445

The error code returned.

ErrorMessage String test error msg

The error message returned.

HttpStatusCode Integer 200

The HTTP status code returned.

RequestId String FSDFSDF-WERWER-XVCX-DSFSDF

The ID of the request.

Success Boolean true

Indicates whether the request is successful.

Examples

Sample requests

http(s)://[Endpoint]/?Action=StartMigration
&MigrationId=123456
&ProjectId=123456
&RegionId=cn-shanghai-finance-1
&<Common request parameters>

Sample success responses

XML format

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

JSON format

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

Error codes

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