Querying Instances That Can Be Used for Restoration (a V3 API)
Function
This API is used to query instances that can be used for restoration.
URI
GET /v3/{project_id}/instances/{instance_id}/backups/restorable-instances
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| project_id | Yes | String | Project ID of a tenant in a region To obtain this value, see Obtaining a Project ID. |
| instance_id | Yes | String | DDM instance ID |
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| offset | No | Integer | Index offset. The query starts from the next piece of data indexed by this parameter. The value is 0 by default. The value must be a non-negative number. |
| limit | No | Integer | Maximum records to be queried. Value range: 1 to 128 If the parameter value is not specified, 10 records are queried by default. |
Request Parameters
| Parameter | Mandatory | Type | Description |
|---|---|---|---|
| X-Auth-Token | Yes | String | 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. |
Response Parameters
Status code: 200
| Parameter | Type | Description |
|---|---|---|
| instances | Array of DDMInstance4Restore objects | Target available DDM instances. |
| offset | Integer | Definition Which page the server starts returning items Range The value is greater than or equal to 0. |
| limit | Integer | Definition Number of records on each page Range The value is greater than 0 and less than or equal to 128. |
| total | Integer | Definition Total number of records Range N/A |
| Parameter | Type | Description |
|---|---|---|
| instance_name | String | Instance name |
| instance_id | String | Instance ID |
| status | String | Status. |
| available | Boolean | Available or not |
| unavailable_reason | String | Reason why the instance cannot be used. |
| vpc_name | String | VPC name. |
Status code: 400
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Status code: 500
| Parameter | Type | Description |
|---|---|---|
| error_code | String | Error code |
| error_msg | String | Error message |
Example Request
GET https://{endpoint}/v3/619d3e78f61b4be68bc5aa0b59edcf7b/instances/1f5c9fd6cd984056ba89c8c87cc03278in09/backups/restorable-instances Example Response
Status code: 200
{
"instances": [
{
"instance_id": "3b65c609427c4b20bc0ae93e161dc7adin09",
"instance_name": "ddm-agent-create-instance1",
"status": "normal",
"available": true,
"unavailable_reason": "",
"vpc_name": "vpc-ddm-172"
}
],
"offset": 0,
"limit": 10,
"total": 1
} Status code: 400
Bad request
{
"error_msg" : "Parameter error.",
"error_code" : "DBS.280001"
} Status code: 500
Server error
{
"error_msg" : "Parameter error.",
"error_code" : "DBS.280001"
} Status Codes
| Status Codes | Description |
|---|---|
| 200 | OK |
| 400 | Bad request |
| 500 | Server error |
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