Updated on 2022-08-02 GMT+08:00

Listing Migration Projects

Function

SMS enables you to use migration projects to manage source servers. This API is used to obtain the list of all migration projects under the current account.

URI

GET /v3/migprojects

Table 1 Query parameters

Parameter

Mandatory

Type

Description

limit

No

Integer

Specifies the number of migration projects recorded on each page

Minimum value: 0

Maximum value: 100

Default value: 50

offset

No

Integer

Specifies the offset.

Minimum value: 0

Maximum value: 65535

Default value: 0

Request

Table 2 Request header parameter

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

Table 3 Response body parameters

Parameter

Type

Description

count

Integer

Specifies the number of queried migration projects.

Minimum value: 0

Maximum value: 2147483647

migprojects

Array of MigprojectsResponseBody objects

Specifies the details of the queried migration projects.

Table 4 MigprojectsResponseBody field description

Parameter

Type

Description

id

String

Specifies the migration project ID

Minimum length: 0 characters

Maximum length: 255 characters

name

String

Specifies the migration project name.

Minimum length: 0 characters

Maximum length: 255 characters

use_public_ip

Boolean

Specifies whether to use a public IP address for migration.

isdefault

Boolean

Specifies whether the migration project is the default project.

start_target_server

Boolean

Specifies whether to start the target server after the migration.

region

String

Specifies the region where the project resides.

Minimum length: 0 characters

Maximum length: 255 characters

speed_limit

Integer

Specifies the migration rate limit configured in the project. The unit is Mbit/s.

Minimum value: 0

Maximum value: 10000

exist_server

Boolean

Specifies whether there are servers in the migration project.

description

String

Describes the migration project.

Minimum length: 0 characters

Maximum length: 255 characters

type

String

Specifies the default migration type of the migration project.

The value can be:

  • MIGRATE_BLOCK
  • MIGRATE_FILE

enterprise_project

String

Specifies the name of the enterprise project to which the migration project belongs.

Minimum length: 0 characters

Maximum length: 255 characters

syncing

Boolean

Specifies whether to perform a continuous synchronization after the full replication is complete.

Example Request

Obtain the list of migration projects.

GET https://{endpoint}/v3/migprojects

Example Response

Status code: 200

A list of migration projects is obtained successfully.

{
  "count" : 6,
  "migprojects" : [ {
    "id" : "58005530-57a4-4589-85dd-69c7ca1bba17",
    "name" : "sms_test",
    "use_public_ip" : true,
    "isdefault" : true,
    "start_target_server" : true,
    "region" : "06334e957c80d2642f39c0030856abdb",
    "speed_limit" : 0,
    "exist_server" : true,
    "description" : "",
    "template" : null,
    "type" : "MIGRATE_BLOCK",
    "enterprise_project" : "defalut"
  }, {
    "id" : "f7edd6c0-7faf-4e1a-8c0b-0bb4b53d162a",
    "name" : "SystemProject",
    "use_public_ip" : true,
    "isdefault" : false,
    "start_target_server" : true,
    "region" : "region",
    "speed_limit" : 0,
    "exist_server" : true,
    "description" : "",
    "template" : null,
    "type" : "MIGRATE_BLOCK",
    "enterprise_project" : "defalut"
  }, {
    "id" : "8dd46a53-c7a6-42c4-98fb-9d140a1f3ac4",
    "name" : "sms_test",
    "use_public_ip" : true,
    "isdefault" : false,
    "start_target_server" : true,
    "region" : "region",
    "speed_limit" : 0,
    "exist_server" : true,
    "description" : "",
    "template" : null,
    "type" : "MIGRATE_BLOCK",
    "enterprise_project" : "defalut"
  }, {
    "id" : "ee35f0bf-6398-494f-a45c-7825e1499840",
    "name" : "sms_test_Test",
    "use_public_ip" : true,
    "isdefault" : false,
    "start_target_server" : true,
    "region" : "region",
    "speed_limit" : 0,
    "exist_server" : true,
    "description" : "",
    "template" : null,
    "type" : "MIGRATE_BLOCK",
    "enterprise_project" : "defalut"
  }, {
    "id" : "9ed854a4-c294-449c-9169-2c70d611bfc9",
    "name" : "sms_test002",
    "use_public_ip" : true,
    "isdefault" : false,
    "start_target_server" : true,
    "region" : "region",
    "speed_limit" : 0,
    "exist_server" : true,
    "description" : "",
    "template" : null,
    "type" : "MIGRATE_BLOCK",
    "enterprise_project" : "defalut"
  }, {
    "id" : "feba29f4-e9a2-4d22-b4bb-9e89a29600ab",
    "name" : "sms_test003",
    "use_public_ip" : true,
    "isdefault" : false,
    "start_target_server" : true,
    "region" : "region",
    "speed_limit" : 0,
    "exist_server" : true,
    "description" : "",
    "template" : null,
    "type" : "MIGRATE_BLOCK",
    "enterprise_project" : "defalut"
  } ]
}

Status Codes

Status Code

Description

200

A list of migration projects is obtained successfully.

Error Codes

See Error Codes.