Listing Migration Tasks
Function
After the target server is configured, SMS automatically creates a migration task. This API is used to query the migration task list.
URI
GET /v3/tasks
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
state |
No |
String |
Specifies the migration task status. The value can be:
|
name |
No |
String |
Specifies the task name. Minimum length: 0 characters Maximum length: 255 characters |
id |
No |
String |
Specifies the task ID. Minimum length: 0 characters Maximum length: 255 characters |
source_server_id |
No |
String |
Specifies the source server ID. Minimum length: 0 characters Maximum length: 255 characters |
limit |
No |
Integer |
Specifies the number of tasks recorded on each page. Minimum value: 0 Maximum value: 200 Default value: 100 |
offset |
No |
Integer |
Specifies the offset. Minimum value: 0 Maximum value: 65535 Default value: 0 |
enterprise_project_id |
No |
String |
Specifies the ID of the enterprise project to be queried. Minimum length: 0 characters Maximum length: 255 characters |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Specifies the user token. It can be obtained by calling the IAM API (value of X-Subject-Token in the response header). Minimum length: 1 character Maximum length: 16,384 characters |
Response
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Specifies the number of tasks that meet the search criteria, which is not affected by pagination. Minimum value: 0 Maximum value: 2147483647 |
tasks |
Array of TasksResponseBody objects |
Specifies the information about the queried tasks. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the migration task ID. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
Specifies the task name, which is defined by the user. Minimum length: 0 characters Maximum length: 255 characters |
type |
String |
Specifies the task type. This parameter is mandatory for creating a migration task and optional for updating a migration task. Minimum length: 0 characters Maximum length: 255 characters The value can be:
|
os_type |
String |
Specifies the OS type. This parameter is mandatory for creating a task and optional for updating a task. Minimum length: 0 characters Maximum length: 255 characters The value can be:
|
state |
String |
Specifies the task status. Minimum length: 0 characters Maximum length: 255 characters |
estimate_complete_time |
Long |
Specifies the estimated completion time. Minimum value: 0 Maximum value: 9223372036854775807 |
create_date |
Long |
Specifies the task creation time. Minimum value: 0 Maximum value: 9223372036854775807 |
priority |
Integer |
Specifies the migration process priority. Minimum value: 0 Maximum value: 2 The value can be:
|
speed_limit |
Integer |
Specifies the migration rate limit. |
migrate_speed |
Double |
Specifies the migration rate, in MB/s. Minimum value: 0 Maximum value: 10000 |
compress_rate |
Double |
Specifies the compression rate. Minimum value: 0 Maximum value: 10000 |
start_target_server |
Boolean |
Specifies whether to start the target server after the migration is complete. The value can be true (start) or false (stop). Default value: false |
error_json |
String |
Specifies the error message. Minimum length: 0 characters Maximum length: 1,024 characters |
total_time |
Long |
Specifies the task duration. Minimum value: 0 Maximum value: 9223372036854775807 |
migration_ip |
String |
Specifies the IP address of the target server. If you use a public network for migration, enter the EIP bound to the target server. If you use a private line for migration, enter a private IP address of the target server. Minimum length: 0 characters Maximum length: 255 characters |
sub_tasks |
Array of SubTaskAssociatedWithTask objects |
Specifies the information about subtasks associated with the migration task. |
source_server |
Specifies the information about the source server associated with the migration task. |
|
enterprise_project_id |
String |
Specifies the migration project ID. Minimum length: 0 characters Maximum length: 255 characters |
target_server |
Specifies the information about the target server associated with the migration task. |
|
log_collect_status |
String |
Specifies the log collection status. The value can be:
|
clone_server |
CloneServerBrief object |
Specifies the information about the cloned server. |
syncing |
Boolean |
Specifies whether to enable synchronization. |
Parameter |
Type |
Description |
---|---|---|
id |
Long |
Specifies the subtask ID. Minimum value: 0 Maximum value: 100 |
name |
String |
Specifies the subtask name. Minimum length: 0 characters Maximum length: 255 characters |
progress |
Integer |
Specifies the progress of the subtask. The value is an integer ranging from 0 to 100. Minimum value: 0 Maximum value: 100 |
start_date |
Long |
Specifies the start time of the subtask. Minimum value: 0 Maximum value: 9223372036854775807 |
end_date |
Long |
Specifies the end time of the subtask. If the subtask is not complete, this parameter is left blank. Minimum value: 0 Maximum value: 9223372036854775807 |
process_trace |
String |
Detailed progress of the migration or synchronization Minimum length: 0 characters Maximum length: 2048 characters |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the source server in the SMS database. Minimum length: 0 characters Maximum length: 255 characters |
ip |
String |
Specifies the IP address of the source server. This parameter is mandatory for registering the source server with SMS and optional for updating the information about the source server. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
Specifies the name of the source server displayed on the SMS console. Minimum length: 0 characters Maximum length: 255 characters |
os_type |
String |
Specifies the OS type of the source server. This parameter is mandatory for registering the source server with SMS and optional for updating the information about the source server. Minimum length: 0 characters Maximum length: 255 characters The value can be:
|
os_version |
String |
Specifies the OS version. Minimum length: 0 characters Maximum length: 255 characters |
oem_system |
Boolean |
Specifies whether the OS is an OEM OS (Windows). |
state |
String |
Specifies the source server status. The value can be:
|
Parameter |
Type |
Description |
---|---|---|
id |
String |
Specifies the ID of the source server in the SMS database. Minimum length: 0 characters Maximum length: 255 characters |
vm_id |
String |
Specifies the ID of the target server. Minimum length: 0 characters Maximum length: 255 characters |
name |
String |
Specifies the name of the target server. Minimum length: 0 characters Maximum length: 255 characters |
ip |
String |
Specifies the IP address of the target server. Minimum length: 0 characters Maximum length: 255 characters |
os_type |
String |
Specifies the OS type of the target server. Minimum length: 0 characters Maximum length: 255 characters The value can be:
|
os_version |
String |
Specifies the OS version. Minimum length: 0 characters Maximum length: 255 characters |
Example Request
Query the list of migration tasks.
GET https://{endpoint}/v3/tasks
Example Response
Status code: 200
OK
{ "count" : 3, "tasks" : [ { "id" : "ef3b9722-07a0-40ae-89b0-889ee96dfc56", "name" : "sms_task_lxxxx11", "type" : "MIGRATE_FILE", "os_type" : "LINUX", "state" : "MIGRATE_SUCCESS", "connected" : true, "estimate_complete_time" : null, "create_date" : 1585139506000, "priority" : 1, "speed_limit" : 0, "migrate_speed" : 0.0, "start_target_server" : true, "error_json" : "", "total_time" : 3878000, "migration_ip" : "", "source_server" : { "id" : "f32ab4d6-d150-4fb3-aa55-edbb5cf9947f", "ip" : "192.168.*.107", "name" : "xxx-linux-1", "os_type" : "LINUX", "os_version" : "CENTOS_7_6_64BIT", "oem_system" : false, "state" : "AVAILABLE" }, "target_server" : { "id" : "267b25a6-4a5b-4143-96b6-29777db00da1", "vm_id" : "", "name" : "", "ip" : null, "os_type" : "LINUX", "os_version" : null }, "log_collect_status" : "INIT" }, { "id" : "a5f9cd5a-cfb2-4313-81d1-3dbf19a1e6d1", "name" : "sms_task_xxx22", "type" : "MIGRATE_BLOCK", "os_type" : "WINDOWS", "state" : "MIGRATE_SUCCESS", "connected" : true, "estimate_complete_time" : null, "create_date" : 1585138569000, "priority" : 1, "speed_limit" : 0, "migrate_speed" : 0.0, "start_target_server" : true, "error_json" : "", "total_time" : 10824000, "migration_ip" : "", "source_server" : { "id" : "91718cc3-b5bf-48ce-b196-5035ffd9ff53", "ip" : "192.168.*.245", "name" : "xxx-windows-2", "os_type" : "WINDOWS", "os_version" : "WINDOWS2012_R2_64BIT", "oem_system" : false, "state" : "AVAILABLE" }, "target_server" : { "id" : "71fe0494-442a-408f-b0b3-0143774e4de4", "vm_id" : "", "name" : "", "ip" : null, "os_type" : "WINDOWS", "os_version" : "WINDOWS2012_R2_64BIT" }, "log_collect_status" : "INIT" }, { "id" : "c51407dd-7d1a-4831-bb93-887869d3ab4b", "name" : "sms_task_leddesktop", "type" : "MIGRATE_BLOCK", "os_type" : "WINDOWS", "state" : "MIGRATE_SUCCESS", "connected" : false, "estimate_complete_time" : null, "create_date" : 1566130392000, "priority" : 1, "speed_limit" : 200, "migrate_speed" : 0.0, "start_target_server" : true, "error_json" : "", "total_time" : 882000, "migration_ip" : "192.168.1.201", "source_server" : null, "target_server" : { "id" : "f985ee82-1a94-4839-b983-fb952dbaf00b", "vm_id" : "a548a4f5-020d-46f8-9b34-59cf1dc60ab6", "name" : "xxx-sms-target", "ip" : null, "os_type" : "WINDOWS", "os_version" : "WINDOWS2008_R2_64BIT" }, "log_collect_status" : "INIT" } ] }
Status Codes
Status Code |
Description |
---|---|
200 |
OK |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot