Querying the Backup Migration Task List
Function
This API is used to obtain the list of backup migration tasks except deleted tasks.
URI
GET /v5/{project_id}/backup-migration-jobs
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID of a tenant in a region. For details about how to obtain the project ID, see Obtaining a Project ID. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
No |
String |
Specifies the task name. Fuzzy matching is supported. |
status |
No |
String |
Status of a backup migration task. TRANSFERRING: Data is being restored. SUCCESS: The migration task is successful. FAILED: The migration task failed. PRECHECK FAILED: The precheck failed. |
dbs_instance_ids |
No |
Array of strings |
DB instance ID. A maximum of 10 DB instance IDs are supported. |
description |
No |
String |
Description. |
create_at |
No |
String |
Creation time. |
completed_at |
No |
String |
Completion time. |
enterprise_project_id |
No |
String |
Enterprise project ID. |
tags |
No |
String |
Tags. |
limit |
No |
Integer |
Maximum number of records that can be returned. The default value is 10. |
offset |
No |
Integer |
Offset. The default value is 0, indicating that the records after this offset will be queried. |
sort_key |
No |
String |
Sorting field. |
sort_dir |
No |
String |
Sorting method. |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
MIME type of the request body. Use the default value application/json. For APIs used to upload objects or images, the value varies depending on the flow type. |
X-Auth-Token |
Yes |
String |
User token obtained from IAM. It is a response to the API for obtaining a user token. This API is the only one that does not require authentication. The token is the value of X-Subject-Token in the response header. |
X-Language |
No |
String |
Request language type. en-us: English zh-cn: Chinese |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
count |
Integer |
Total number of backup migration tasks. |
jobs |
Array of OfflineTaskInfo objects |
List of backup migration tasks. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Task ID. |
name |
String |
Task name. |
status |
String |
Task status.
|
engine_type |
String |
DB engine.
|
error_log |
String |
Error logs. |
description |
String |
Description. |
create_time |
String |
Time when a task is created. |
finish_time |
String |
Time when a task is complete. |
enterprise_project_id |
String |
Enterprise project. |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error message. |
Example Request
Querying the backup migration task list
https://{endpoint}/v5/054ba152d480d55b2f5dc0069e7ddef0/backup-migration-jobs?limit=1
Example Response
Status code: 200
OK
{ "jobs" : [ { "id" : "0667845a-6291-4e2a-95b0-190c0abjb703", "name" : "DRS-6813", "status" : "SUCCESS", "description": "Destination RDS instance name: rds-sqlserver2022-stand", "engine_type" : "sqlserver", "create_time" : "2024-08-19T02:27:15Z", "finish_time" : "2024-08-19T02:29:03Z", "enterprise_project_id" : "0" } ], "count" : 35 }
Status code: 400
Bad Request
{ "error_code" : "DRS.10000001", "error_msg" : "Failed." }
Status Code
Status Code |
Description |
---|---|
200 |
OK |
400 |
Bad Request |
Error Code
For details, see Error Code.
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