Updated on 2025-12-04 GMT+08:00

Querying Backups

Function

This API is used to query backups based on specified conditions.

GeminiDB Cassandra only allows you to view incremental backups and differential backups and their sizes.

Authorization Information

Each account has permissions to call all APIs, but IAM users must have the required permissions specifically assigned.

  • If you are using role/policy-based authorization, see the required permissions in Permissions and Supported Actions.
  • If you are using identity policy-based authorization, the following identity policy-based permissions are required.

    Action

    Access Level

    Resource Type (*: required)

    Condition Key

    Alias

    Dependencies

    gaussdbfornosql:instance:listRestorableInstances

    List

    instance *

    • g:ResourceTag/<tag-key>
    • g:EnterpriseProjectId

    nosql:instance:list

    -

URI

GET /v3/{project_id}/backups

Table 1 URI parameters

Parameter

Mandatory

Type

Description

project_id

Yes

String

Definition

Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID.

Constraints

N/A

Range

N/A

Default Value

N/A

Table 2 Query parameters

Parameter

Mandatory

Type

Description

offset

Yes

Integer

Definition

Page number.

Constraints

N/A

Range

This value is greater than or equal to 1.

Default Value

N/A

limit

Yes

Integer

Definition

Number of records on each page.

Constraints

N/A

Range

1 to 100

Default Value

N/A

datastore_type

No

String

Definition

API type

Range

  • cassandra: GeminiDB Cassandra API
  • mongodb: GeminiDB Mongo API
  • redis: GeminiDB Redis API
  • influxdb: GeminiDB Influx API

Default Value

If this parameter is not transferred, all APIs are queried.

type

No

String

Definition

Backup policy type

Range

  • Instance: An instance backup is queried.
  • DatabaseTable: A table-level backup is queried. This parameter is available only for GeminiDB Cassandra API.

Default Value

Instance

instance_id

No

String

Definition

Instance ID

Constraints

N/A

Range

N/A

Default Value

If this parameter is not transferred, all backups are queried.

backup_id

No

String

Definition

Backup ID.

Constraints

N/A

Range

N/A

Default Value

If this parameter is not transferred, all backups are queried.

backup_type

No

String

Definition

Backup type.

Constraints

N/A

Range

  • Auto: indicates that the backup is an automated full backup.
  • Manual: indicates that the backup is a manual full backup.
  • Incremental: indicates that the backup is an incremental backup.
  • Differential: indicates that the backup is a differential backup.

Default Value

N/A

begin_time

No

String

Definition

Time when a backup query starts

Constraints

The value is in UTC format.

Range

The format is yyyy-mm-dd hh:mm:ss.

Default Value

N/A

end_time

No

String

Definition

Time when a backup query ends

Constraints

The value is in UTC format.

Range

The format is yyyy-mm-dd hh:mm:ss.

Default Value

N/A

Request Parameters

Table 3 Request header parameters

Parameter

Mandatory

Type

Description

X-Auth-Token

Yes

String

Definition

User token

You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication.

Constraints

N/A

Range

N/A

Default Value

N/A

Response Parameters

Status code: 202

Table 4 Response body parameters

Parameter

Type

Description

total_count

Long

Definition

Total number of records.

Range

N/A

backups

Array of objects

Definition

Backup list. For details, see Table 5.

Table 5 backups

Parameter

Type

Description

id

String

Definition

Backup ID.

Range

N/A

name

String

Definition

Backup name.

Range

N/A

description

String

Definition

Backup description.

Range

N/A

begin_time

String

Definition

Backup start time

Constraints

UTC time in the yyyy-mm-dd hh:mm:ss format

end_time

String

Definition

Backup end time

Constraints

UTC time in the yyyy-mm-dd hh:mm:ss format

status

String

Definition

Backup status.

Range

  • BUILDING: indicates that the backup is in progress.
  • COMPLETED: indicates that the backup is completed.
  • FAILED: indicates that the backup failed.

size

Double

Definition

Backup size, in KB.

Range

N/A

type

String

Definition

Backup type

Range

  • Auto: automated full backup
  • Manual: manual full backup
  • Incremental: incremental backup
  • Differential: differential backup

instance_id

String

Definition

Instance ID

Range

N/A

instance_name

String

Definition

Instance name.

Range

N/A

datastore

object

Definition

Database information. For details, see Table 6.

Table 6 datastore

Parameter

Type

Description

type

String

Definition

Database type

Range

  • cassandra: GeminiDB Cassandra instance
  • mongodb: GeminiDB Mongo instance
  • influxdb: GeminiDB Influx instance
  • redis: GeminiDB Redis instance

version

String

Definition

Database version

Range

N/A

Example Requests

  • URI example
    GET https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3/054b61972980d4552f0bc00ac8d3f5cd/backups?instance_id=c0c9f155c7b7423a9d30f0175998b63bin01&offset=2&limit=2&begin_time=2018-07-06 10:41:14&end_time=2018-08-16 10:41:14&type=DatabaseTable
  • Incremental backups and their sizes
    GET https://{Endpoint}/v3/2900b7b8d03e4619b8db8d43bc6234ee/backups?offset=1&limit=5&backup_type=Incremental&instance_id=3149aee486d748f68db1ee81e95b9f56in06
  • Differential backups and their sizes
    GET https://{Endpoint}/v3/2900b7b8d03e4619b8db8d43bc6234ee/backups?offset=1&limit=5&backup_type=Differential&instance_id=3149aee486d748f68db1ee81e95b9f56in06
  • Example request body

    None

Example Responses

Status code: 200

Successful response

{
   "total_count" : 4, 
   "backups" : [ { 
     "id" : "43e4feaab48f11e89039fa163ebaa7e4br01", 
     "name" : "backup-test", 
     "instance_id" : "43e4feaab48f11e89039fa163ebaa7e4br01", 
     "instance_name" : "cluster-test", 
     "datastore" : { 
       "type" : "cassandra", 
       "version" : "3.4" 
     }, 
     "type" : "Auto", 
     "begin_time" : "2018-08-06 12:41:14", 
     "end_time" : "2018-08-06 12:43:14", 
     "status" : "COMPLETED", 
     "size" : 2803, 
     "description" : "backup description", 
   }, { 
     "id" : "43e4feaab48f11e89039fa163ebaa7e4br02", 
     "name" : "backup-test-2", 
     "instance_id" : "43e4feaab48f11e89039fa163ebaa7e4br02", 
     "instance_name" : "cluster-test", 
     "datastore" : { 
       "type" : "cassandra", 
       "version" : "3.4" 
     }, 
     "type" : "Manual", 
     "begin_time" : "2018-08-06 12:41:14", 
     "end_time" : "2018-08-06 12:43:14", 
     "status" : "COMPLETED", 
     "size" : 2803, 
     "description" : "backup description", 
   } ] 
 }

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.