Starting a Migration Task
Function
This API is used to start a paused or failed migration task.
Calling Method
For details, see Calling APIs.
URI
POST /v2/{project_id}/tasks/{task_id}/start
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
The project ID. Minimum length: 1 character Maximum length: 1,024 characters |
|
task_id |
Yes |
String |
The migration task ID. Minimum length: 1 character Maximum length: 1,024 characters |
Request
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
The token used for IAM authentication. Minimum length: 1 character Maximum length: 16,384 characters |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
src_ak |
No |
String |
The AK for accessing the source node. Enter a maximum of 100 characters. This parameter is not required for URL list–based migration tasks. Minimum length: 1 character Maximum length: 100 characters |
|
src_sk |
No |
String |
The SK for accessing the source node. Enter a maximum of 100 characters. This parameter is not required for URL list–based migration tasks. Minimum length: 1 character Maximum length: 100 characters |
|
json_auth_file |
No |
String |
The file used for Google Cloud Storage authentication. Minimum length: 0 characters Maximum length: 65,535 characters |
|
src_security_token |
No |
String |
The temporary token for accessing the source node. Minimum length: 0 characters Maximum length: 16,384 characters |
|
dst_ak |
Yes |
String |
The AK for accessing the destination node. Enter a maximum of 100 characters. Minimum length: 1 character Maximum length: 100 characters |
|
dst_sk |
Yes |
String |
The SK for accessing the destination node. Enter a maximum of 100 characters. Minimum length: 1 character Maximum length: 100 characters |
|
dst_security_token |
No |
String |
The temporary token for accessing the destination node. Minimum length: 0 characters Maximum length: 16,384 characters |
|
source_cdn_authentication_key |
No |
String |
The CDN authentication key. Minimum length: 0 characters Maximum length: 255 characters |
|
migrate_failed_object |
No |
Boolean |
Whether to migrate all objects in the migration task. The default value is false (full migration). If the value is true, only failed objects will be migrated again. If the value is blank or false, all objects in the migration task will be migrated again. Default value: false |
Response
Status code: 200
OK
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_msg |
String |
The error message. |
|
error_code |
String |
The error code. |
Example Request
-
This example starts a paused task that does not use the URL list-based migration method, using the AK/SK pairs of both source and destination accounts as input parameters.
POST https://{endpoint}/v2/{project_id}/tasks/{task_id}/start { "src_ak" : "src_ak", "src_sk" : "src_sk", "dst_ak" : "dst_ak", "dst_sk" : "dst_sk", "migrate_failed_object" : false } -
This example starts a paused task that uses the URL list-based migration method, using the AK/SK pair of the destination account as input parameters.
POST https://{endpoint}/v2/{project_id}/tasks/{task_id}/start { "dst_ak" : "dst_ak", "dst_sk" : "dst_sk", "migrate_failed_object" : false }
Example Response
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
OK |
|
400 |
Bad request |
Error Codes
For details, see Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.