Starts a data migration, data synchronization, or change tracking 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 StartDtsJob

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

DtsJobId String Yes l3m1213ye7l****

The ID of the data migration, data synchronization, or change tracking task.

DtsInstanceId String No dtsl3m1213ye7l****

The ID of the data migration, data synchronization, or change tracking instance.

Note You can call the DescribeMigrationJobs, DescribeSubscriptionInstances, or DescribeSynchronizationJobs operation to query the instance ID
SynchronizationDirection String No Forward

The synchronization direction. Default value: Forward. Valid values:

  • Forward: Data is synchronized from the source database to the destination database.
  • Reverse: Data is synchronized from the destination database to the source database.
    Note You can set this parameter to Reverse to start the reverse synchronization task only if the topology is two-way synchronization.
RegionId String No cn-hangzhou

The region ID of the Data Transmission Service (DTS) instance. For more information, see List of supported regions.

Response parameters

Parameter Type Example Description
HttpStatusCode Integer 200

The HTTP status code.

RequestId String 601B6F25-21E7-4484-99D5-3EF2625C****

The ID of the request.

ErrCode String InternalError

The error code returned if the request failed.

Success Boolean true

Indicates whether the request was successful.

ErrMessage String The Value of Input Parameter %s is not valid.

The error message returned if the request failed.

DynamicMessage String DtsJobId

The dynamic part in the error message. This parameter is used to replace the %s variable in the ErrMessage parameter.

Note For example, if the returned value of the ErrMessage parameter is The Value of Input Parameter %s is not valid and the returned value of the DynamicMessage parameter is DtsJobId, the specified DtsJobId parameter is invalid.
DynamicCode String 403

The dynamic error code. This parameter will be removed in the future.

Examples

Sample requests

http(s)://dts.aliyuncs.com/?Action=StartDtsJob
&DtsJobId=l3m1213ye7l****
&<Common request parameters>

Sample success responses

XML format

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

<StartDtsJobResponse>
    <RequestId>2D3B4615-923F-49AA-AF21-6D8E3967****</RequestId>
    <HttpStatusCode>200</HttpStatusCode>
    <Success>true</Success>
</StartDtsJobResponse>

JSON format

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

{
  "RequestId" : "2D3B4615-923F-49AA-AF21-6D8E3967****",
  "HttpStatusCode" : 200,
  "Success" : true
}

Error codes

HTTP status code Error code Error message Description
403 OperationDenied.NotPurchased The instance has not been purchased and the task cannot be started. The error message returned because the instance has not been purchased and the task cannot be started. Purchase an instance first.
403 InvalidSecurityToken.Expired Specified SecurityToken is expired. The error message returned because the signature expired. Use a new signature.
400 Throttling.User Request was denied due to user flow control. The error message returned because the number of requests exceeds the limit and the request is rejected. Try again later.
500 ServiceUnavailable The request has failed due to a temporary failure of the server. The error message returned because the response of the server timed out or the server was unavailable. Try again. If the error persists, contact technical support.

For a list of error codes, see Service error codes.