Starting a Migration Task

Function

This API is used to start a migration task after the migration task has been paused or failed.

Debugging

You can debug this API in API Explorer.

URI

POST /v2/{project_id}/tasks/{task_id}/start

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Specifies the project ID.

Minimum length: 1 character

Maximum length: 1,024 characters

task_id

Yes

Long

Specifies the migration task ID.

Minimum value: 0

Maximum value: 999999999999999

Request

Table 2 Request header parameter

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Specifies the token used for IAM authentication.

Minimum length: 1 character

Maximum length: 16,384 characters

Table 3 Request body parameters

Parameter

Mandatory

Type

Description

src_ak

No

String

Specifies the AK for accessing the source node. Enter a maximum of 100 characters. This parameter is not required for URL list migration tasks.

Minimum length: 1 character

Maximum length: 100 characters

src_sk

No

String

Specifies the SK for accessing the source node. Enter a maximum of 100 characters. This parameter is not required for URL list migration tasks.

Minimum length: 1 character

Maximum length: 100 characters

src_security_token

No

String

Specifies the temporary token for accessing the source node.

Minimum length: 0 characters

Maximum length: 16,384 characters

dst_ak

Yes

String

Specifies the AK for accessing the destination node.

Minimum length: 1 character

Maximum length: 100 characters

dst_sk

Yes

String

Specifies the SK for accessing the destination node.

Minimum length: 1 character

Maximum length: 100 characters

dst_security_token

No

String

Specifies the temporary token for accessing the destination node.

Minimum length: 0 characters

Maximum length: 16,384 characters

source_cdn_authentication_key

No

String

Specifies the CDN authentication key.

migrate_failed_object

No

Boolean

Specifies 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: 400

Table 4 Response body parameters

Parameter

Type

Description

error_msg

String

Specifies the error message.

error_code

String

Specifies the error code.

Example Request

  • Start a non-URL list migration task.
    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",
      "src_cdn_authentication_key" : "xxxxxx",
      "migrate_failed_object" : false
    }
  • Start a URL list migration task.
    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

See Error Codes.