Updated on 2022-02-22 GMT+08:00

Querying All Backups

Function

This API is used to query all backups.

URI

GET /v3/{project_id}/backups

Table 1 Path parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Project ID

Table 2 Query parameters

Parameter

Mandatory

Type

Description

checkpoint_id

No

String

Restore point ID

dec

No

Boolean

Dedicated cloud

end_time

No

String

Time when the backup ends, in %YYYY-%mm-%ddT%HH:%MM:%SSZ format. For example, 2018-02-01T12:00:00Z.

enterprise_project_id

No

String

Enterprise project ID or all_granted_eps. all_granted_eps indicates querying the IDs of all enterprise projects on which the user has permissions.

image_type

No

String

Backup type

Enumeration values:

  • backup

  • replication

limit

No

Integer

Number of records displayed per page. The value must be a positive integer.

marker

No

String

ID of the last record displayed on the previous page

member_status

No

String

Backup sharing status

Enumeration values:

  • pending

  • accept

  • reject

name

No

String

Backup name

offset

No

Integer

Offset value. The value must be a positive integer.

own_type

No

String

Owning type of a backup. private backups are queried by default.

Default: private

Enumeration values:

  • all_granted

  • private

  • shared

parent_id

No

String

Parent backup ID

resource_az

No

String

AZ-based filtering is supported.

resource_id

No

String

Resource ID

resource_name

No

String

Resource name

resource_type

No

String

Resource type

Enumeration values:

  • OS::Cinder::Volume

  • OS::Nova::Server

sort

No

String

A group of properties separated by commas (,) and sorting directions. The value format is [:],[:], where the value of direction is asc (in ascending order) or desc (in descending order). If the parameter direction is not specified, the default sorting direction is desc. The value of sort contains a maximum of 255 characters. The value range of key is as follows: [created_at, updated_at, name, status, protected_at, id]

start_time

No

String

Time when the backup starts, in %YYYY-%mm-%ddT%HH:%MM:%SSZ format. For example, 2018-02-01T12:00:00Z.

status

No

String

Status.

You can specify one or more status, such as status=available&status=error.

Enumeration values:

  • available

  • protecting

  • deleting

  • restoring

  • error

  • waiting_protect

  • waiting_delete

  • waiting_restore

used_percent

No

String

Backups are filtered based on the occupied vault capacity. The value ranges from 1 to 100. For example, if used_percent is set to 80, all backups who occupied 80% or more of the vault capacity are displayed.

vault_id

No

String

Vault ID

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

User token.

Obtained by calling the corresponding IAM API. If the request is successfully processed, the value of X-Subject-Token included in the response header is the token value.

Response Parameters

Status code: 200

Table 4 Response body parameters

Parameter

Type

Description

backups

Array of BackupResp objects

Backup list

count

Integer

Number of backups

Table 5 BackupResp

Parameter

Type

Description

checkpoint_id

String

Restore point ID

created_at

String

Creation time, for example, 2020-02-05T10:38:34.209782

description

String

Backup description

expired_at

String

Expiration time, for example, 2020-02-05T10:38:34.209782

extend_info

BackupExtendInfo object

Extended information

id

String

Backup ID

image_type

String

Backup type

Enumeration values:

  • backup

  • replication

name

String

Backup name

parent_id

String

Parent backup ID

project_id

String

Project ID

protected_at

String

Backup time

resource_az

String

Resource availability zone

resource_id

String

Resource ID

resource_name

String

Resource name

resource_size

Integer

Resource size, in GB

resource_type

String

Resource type

Enumeration values:

  • OS::Nova::Server

  • OS::Cinder::Volume

status

String

Backup status

Enumeration values:

  • available

  • protecting

  • deleting

  • restoring

  • error

  • waiting_protect

  • waiting_delete

  • waiting_restore

updated_at

String

Update time, for example, 2020-02-05T10:38:34.209782

vault_id

String

Vault ID

enterprise_project_id

String

Enterprise project ID. The default value is 0.

Table 6 BackupExtendInfo

Parameter

Type

Description

auto_trigger

Boolean

Whether the backup is automatically generated

bootable

Boolean

Whether the backup is a system disk backup

incremental

Boolean

Whether the backup is an incremental backup

snapshot_id

String

Snapshot ID of the disk backup

support_lld

Boolean

Whether to allow lazyloading for fast restoration

supported_restore_mode

String

Restoration mode. Possible values are na, snapshot, and backup. snapshot indicates the backup can be used to create a full-server image. backup indicates the data is restored from backups of the EVS disks of the server. na indicates the backup cannot be used for restoration.

Default: na

Enumeration values:

  • na

  • backup

  • snapshot

os_images_data

Array of ImageData objects

ID list of images created using backups

contain_system_disk

Boolean

Whether the VM backup data contains system disk data

encrypted

Boolean

Whether the backup is encrypted

system_disk

Boolean

Whether the disk is a system disk

Table 7 ImageData

Parameter

Type

Description

image_id

String

Table 8 ReplicationRecordGet

Parameter

Type

Description

created_at

String

Start time of the replication

destination_backup_id

String

ID of the destination backup used for replication

destination_checkpoint_id

String

Record ID of the destination backup used for replication

destination_project_id

String

ID of the replication destination project

destination_region

String

Replication destination region

destination_vault_id

String

Destination vault ID

extra_info

String

Additional information of the replication

id

String

Replication record ID

source_backup_id

String

ID of the source backup used for replication

source_checkpoint_id

String

ID of the source backup record used for replication

source_project_id

String

ID of the replication source project

source_region

String

Replication source region

status

String

Replication status

Enumeration values:

  • replicating

  • success

  • fail

  • skip

  • waiting_replicate

vault_id

String

ID of the vault where the backup resides

Example Requests

None

Example Responses

Status code: 200

OK

{
  "count" : 2,
  "backups" : [ {
    "provider_id" : "0daac4c5-6707-4851-97ba-169e36266b66",
    "checkpoint_id" : "1fced58b-2a31-4851-bcbb-96216f83ce99",
    "updated_at" : "2020-02-21T07:07:25.113761",
    "vault_id" : "cca85ea5-00a4-418d-9222-bd83985bc515",
    "id" : "b1c4afd9-e7a6-4888-9010-c2bac3aa7910",
    "resource_az" : "br-iaas-odin1a",
    "image_type" : "backup",
    "resource_id" : "1a503932-ee8f-4dd5-8248-8dfb57e584c5",
    "resource_size" : 40,
    "children" : [ ],
    "extend_info" : {
      "auto_trigger" : true,
      "supported_restore_mode" : "backup",
      "contain_system_disk" : true,
      "support_lld" : true,
      "architecture" : "x86_64",
      "system_disk" : false,
      "app_consistency" : {
        "app_consistency_error_code" : "0",
        "app_consistency_status" : "0",
        "app_consistency_error_message" : "",
        "app_consistency" : "0"
      }
    },
    "project_id" : "0605767b5780d5762fc5c0118072a564",
    "status" : "available",
    "resource_name" : "test001-02",
    "description" : "",
    "expired_at" : "2020-05-21T07:00:54.060493",
    "replication_records" : [ ],
    "name" : "autobk_b629",
    "created_at" : "2020-02-21T07:00:54.065135",
    "resource_type" : "OS::Nova::Server"
  }, {
    "provider_id" : "d1603440-187d-4516-af25-121250c7cc97",
    "checkpoint_id" : "f64c351f-769f-4c04-8806-fd90a59e9b12",
    "updated_at" : "2020-02-21T07:09:37.767084",
    "vault_id" : "79bd9daa-884f-4f84-b8fe-235d58cd927d",
    "id" : "5606aab5-2dc2-4498-8144-dc848d099af5",
    "resource_az" : "br-iaas-odin1a",
    "image_type" : "backup",
    "resource_id" : "54f7ccbc-072f-4ec5-a7b7-b24dabdb4539",
    "resource_size" : 40,
    "children" : [ ],
    "extend_info" : {
      "auto_trigger" : true,
      "snapshot_id" : "e3def9a8-e4b4-4c12-b132-f4ba8ce9a34f",
      "bootable" : true,
      "progress" : 100,
      "support_lld" : true,
      "encrypted" : false,
      "system_disk" : false
    },
    "project_id" : "0605767b5780d5762fc5c0118072a564",
    "status" : "available",
    "resource_name" : "qsy_000",
    "description" : "",
    "expired_at" : "2020-03-22T07:00:34.877896",
    "replication_records" : [ ],
    "name" : "autobk_6809",
    "created_at" : "2020-02-21T07:00:34.882174",
    "resource_type" : "OS::Cinder::Volume"
  } ]
}

Status Codes

Status Code

Description

200

OK

Error Codes

See Error Codes.