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 value: 0 Maximum value: 100 Default value: 50 |
offset |
No |
Integer |
The offset. Minimum value: 0 Maximum value: 65535 Default value: 0 |
Request
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
X-Auth-Token The user token. The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. Minimum length: 1 character Maximum length: 16,384 characters |
Response
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
The number of queried migration projects. Minimum value: 0 Maximum value: 2147483647 |
migprojects |
Array of MigprojectsResponseBody objects |
The details of the queried migration projects. Array length: 0 to 65,535 |
Parameter |
Type |
Description |
---|---|---|
id |
String |
The migration project ID. Minimum length: 1 character Maximum length: 254 characters |
name |
String |
The migration project name. Minimum length: 2 characters Maximum length: 19 characters |
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 length: 0 characters Maximum length: 255 characters |
speed_limit |
Integer |
The migration rate limit configured in the project. The unit is Mbit/s. Minimum value: 0 Maximum value: 10000 |
exist_server |
Boolean |
Indicates whether there are servers in the migration project. |
description |
String |
Describes the migration project. Minimum length: 0 characters Maximum length: 255 characters |
type |
String |
The migration project type. MIGRATE_BLOCK: block-level migration MIGRATE_FILE: file-level migration The value can be:
|
enterprise_project |
String |
The name of the enterprise project to which the migration project belongs. Minimum length: 0 characters Maximum length: 255 characters |
syncing |
Boolean |
Whether to perform a continuous synchronization after the full replication is complete. |
start_network_check |
Boolean |
Whether to measure the network performance. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
The error code. Minimum length: 0 characters Maximum length: 255 characters |
error_msg |
String |
The error message. Minimum length: 0 characters Maximum length: 255 characters |
encoded_authorization_message |
String |
Encrypted authorization information. Minimum length: 0 characters Maximum length: 65,535 characters |
error_param |
Array of strings |
Invalid parameter. Minimum length: 0 characters Maximum length: 65,535 characters Array length: 1 to 20 |
details |
Array of details objects |
The error message. Array length: 1 to 20 |
Example Request
Obtain the list of migration projects.
GET https://{endpoint}/v3/migprojects
Example Response
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 |
A list of migration projects was obtained. |
403 |
Authentication failed. |
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.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot