This API is used to check whether a target resource can be restored.
POST https://{endpoint}/v1/{project_id}/providers/{provider_id}/resources/action
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
project_id |
Yes |
String |
Project ID |
provider_id |
Yes |
String |
Backup provider ID, which specifies whether the backup object is a server or disk. This parameter has a fixed value. For CSBS, the value is fc4d5750-22e7-4798-8a46-f48f62c4c1da. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
check_restorable |
Yes |
List<restorable_param> |
Query parameter list For details, see Table 3. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
checkpoint_item_id |
Yes |
String |
ID of the backup used to restore data |
target |
Yes |
restorable_target |
Restoration target For details, see Table 4. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
resource_id |
Yes |
String |
ID of the resource to which the backup is restored |
resource_type |
Yes |
String |
Type of the target to which the backup is restored, for example, OS::Nova::Server for an ECS |
volumes |
Yes |
List<restore_volume_mapping> |
Disk mapping list for restoring an ECS. Enter the mapping between disks and backups based on the actual situation. For details, see Table 5. |
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
backup_id |
Yes |
String |
Disk backup ID. Use the API in Querying a Single Backup to obtain the disk backup ID. |
volume_id |
Yes |
String |
ID of the destination disk for the restoration |
POST https://{endpoint}/v1/{project_id}/providers/{provider_id}/resources/action
{
"check_restorable" : [ {
"checkpoint_item_id" : "8986ce68-3da7-4d29-9cc2-1921e9504975",
"target" : {
"resource_type" : "OS::Nova::Server",
"resource_id" : "5aa119a8-d25b-45a7-8d1b-88e127885635",
"volumes" : [ {
"backup_id" : "7ea119a8-d25b-43a7-8d1b-88e12788513a",
"volume_id" : "45baf976-c20a-4894-a7c3-c94b7376bf55"
} ]
}
} ]
}
Parameter |
Type |
Description |
|---|---|---|
restorable |
List<check_resp> |
Response parameter list For details, see Table 7. |
{
"restorable" : [ {
"resource_id" : "6507cb66-90dc-4a12-a573-c9f3398f899d",
"resource_type" : "OS::Nova::Server",
"result" : true,
"error_msg" : "",
"error_code" : ""
} ]
}
Status Code |
Description |
|---|---|
200 |
OK |
Status Code |
Description |
|---|---|
400 |
Invalid request parameters. |
401 |
Authentication failed. |
403 |
No operation permission. |
404 |
Requested object not found. |
500 |
Service internal error. |
503 |
Service unavailable. |
For details, see Error Codes.