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.
Calling Method
For details, see Calling APIs.
URI
GET /v3/migprojects
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
limit |
No |
Integer |
The number of migration projects recorded on each page Minimum: 0 Maximum: 100 Default: 50 |
|
offset |
No |
Integer |
The offset. Minimum: 0 Maximum: 65535 Default: 0 |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. The token can be obtained by calling the IAM API for obtaining a user token. The value of X-Subject-Token in the response header is the user token. Minimum: 1 Maximum: 16384 |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
count |
Integer |
The number of queried migration projects. Minimum: 0 Maximum: 2147483647 |
|
migprojects |
Array of MigprojectsResponseBody objects |
The details of queried migration projects. Array Length: 0 - 65535 |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
The migration project ID. Minimum: 1 Maximum: 255 |
|
name |
String |
The migration project name. Minimum: 1 Maximum: 20 |
|
use_public_ip |
Boolean |
Indicates whether a public IP address is used for migration. |
|
isdefault |
Boolean |
Indicates whether the migration project is the default project. |
|
start_target_server |
Boolean |
Indicates whether the target server is started after the migration is complete. |
|
region |
String |
The region name. Minimum: 0 Maximum: 255 |
|
speed_limit |
Integer |
The migration rate limit configured in the project. The unit is Mbit/s. Minimum: 0 Maximum: 10000 |
|
exist_server |
Boolean |
Indicates whether there are servers in the migration project. |
|
description |
String |
The migration project description. Minimum: 0 Maximum: 255 |
|
type |
String |
The migration project type. MIGRATE_BLOCK MIGRATE_FILE Enumeration values: |
|
enterprise_project |
String |
The name of the enterprise project to which the migration project belongs. Minimum: 0 Maximum: 255 |
|
syncing |
Boolean |
Indicate whether continuous synchronization is performed after the full replication is complete. |
|
start_network_check |
Boolean |
Indicates whether network performance measurement is enabled. |
Status code: 403
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
The error code. Minimum: 0 Maximum: 255 |
|
error_msg |
String |
The error message. Minimum: 0 Maximum: 255 |
|
encoded_authorization_message |
String |
The encrypted authorization information. Minimum: 0 Maximum: 65535 |
|
error_param |
Array of strings |
Error parameters. Minimum: 0 Maximum: 65535 Array Length: 1 - 20 |
|
details |
Array of details objects |
The error details. Array Length: 1 - 20 |
Example Requests
This example obtains the list of migration projects.
GET https://{endpoint}/v3/migprojects
Example Responses
Status code: 200
The list of migration projects was obtained.
{
"count" : 6,
"migprojects" : [ {
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
"name" : "sms_test",
"use_public_ip" : true,
"isdefault" : true,
"start_target_server" : true,
"region" : "06334e957c80d2642f39c0030856abdb",
"speed_limit" : 0,
"exist_server" : true,
"description" : "",
"type" : "MIGRATE_BLOCK",
"enterprise_project" : "default"
}, {
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
"name" : "SystemProject",
"use_public_ip" : true,
"isdefault" : false,
"start_target_server" : true,
"region" : "region",
"speed_limit" : 0,
"exist_server" : true,
"description" : "",
"type" : "MIGRATE_BLOCK",
"enterprise_project" : "default"
}, {
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
"name" : "sms_test",
"use_public_ip" : true,
"isdefault" : false,
"start_target_server" : true,
"region" : "region",
"speed_limit" : 0,
"exist_server" : true,
"description" : "",
"type" : "MIGRATE_BLOCK",
"enterprise_project" : "default"
}, {
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
"name" : "sms_test_Test",
"use_public_ip" : true,
"isdefault" : false,
"start_target_server" : true,
"region" : "region",
"speed_limit" : 0,
"exist_server" : true,
"description" : "",
"type" : "MIGRATE_BLOCK",
"enterprise_project" : "default"
}, {
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
"name" : "sms_test002",
"use_public_ip" : true,
"isdefault" : false,
"start_target_server" : true,
"region" : "region",
"speed_limit" : 0,
"exist_server" : true,
"description" : "",
"type" : "MIGRATE_BLOCK",
"enterprise_project" : "default"
}, {
"id" : "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxx0001",
"name" : "sms_test003",
"use_public_ip" : true,
"isdefault" : false,
"start_target_server" : true,
"region" : "region",
"speed_limit" : 0,
"exist_server" : true,
"description" : "",
"type" : "MIGRATE_BLOCK",
"enterprise_project" : "default"
} ]
}
Status code: 403
Authentication failed.
{
"error_code" : "SMS.9004",
"error_msg" : "The current account does not have the permission to execute policy. You do not have permission to perform action XXX on resource XXX.",
"encoded_authorization_message" : "XXXXXX",
"error_param" : [ "You do not have permission to perform action XXX on resource XXX." ],
"details" : [ {
"error_code" : "SMS.9004",
"error_msg" : "You do not have permission to perform action XXX on resource XXX."
} ]
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
The list of migration projects was obtained. |
|
403 |
Authentication failed. |
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.