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

Querying Backups

Function

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

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:backup:list

    List

    -

    -

    nosql:backup:list

    -

URI

GET /v3.1/{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

instance_id

No

String

Definition

Instance ID

Constraints

N/A

Range

N/A

Default Value

N/A

datastore_type

No

String

Definition

Database type

Constraints

N/A

Range

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

Default Value

N/A

backup_id

No

String

Definition

Backup ID.

Constraints

N/A

Range

N/A

Default Value

N/A

backup_type

No

String

Definition

Backup type

Constraints

The value is case sensitive.

Range

  • Auto: automated full backup
  • Manual: manual full backup

Default Value

If this parameter is not transferred, all automated and manual full backups (including database- and table-level backups) are queried by default.

type

No

String

Definition

Backup policy type

Constraints

N/A

Range

  • Instance: An instance backup is queried.
  • DatabaseTable: A database or table backup is queried.

Default Value

Instance

limit

No

Integer

Definition

Maximum backup records to be queried.

Constraints

N/A

Range

1 to 100

Default Value

If this parameter is not transferred, the first 100 instances are queried by default.

offset

No

Integer

Definition

Index position. The query starts from the next backup creation time indexed by this parameter under a specified project. If offset is set to N, the resource query starts from the N+1 piece of data.

Constraints

N/A

Range

The value must be greater than or equal to 0.

Default Value

If this parameter is not transferred, the index offset is 0 by default, indicating that the query starts from the latest created instance.

begin_time

No

String

Definition

Time when a backup query starts

Constraints

When end_time is not empty, begin_time is mandatory.

Range

The value is in the format of yyyy-mm-ddThh:mm:ssZ. T indicates start time and Z a time zone offset.

Default Value

Null

end_time

No

String

Definition

Time when a backup query ends

Constraints

When begin_time is not empty, end_time is mandatory.

Range

The value is in the format of yyyy-mm-ddThh:mm:ssZ. T indicates start time and Z a time zone offset.

Default Value

Null

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

Integer

Definition

Total backups.

Range

N/A

backups

Array of objects

Definition

Backup details. For details, see Table 5.

Table 5 Backup

Parameter

Type

Description

id

String

Definition

Backup ID.

Range

N/A

description

String

Definition

Backup description.

Range

N/A

instance_id

String

Definition

ID of the instance that the backup is created for.

Range

N/A

instance_name

String

Definition

Name of the instance that the backup is created for.

Range

N/A

datastore

object

Definition

DB version information. For details, see Table 6.

name

String

Definition

Backup name.

Range

N/A

type

String

Definition

Backup type

Range

  • Auto: automated full backup
  • Manual: manual full backup

size

Double

Definition

Backup size, in KB.

Range

N/A

status

String

Definition

Backup status

Range

  • BUILDING, indicating that the backup is in progress.
  • COMPLETED, indicating that the backup is completed.
  • FAILED, indicating that the backup failed.

begin_time

String

Definition

Backup start time

Constraints

The value is in the format of yyyy-mm-ddThh:mm:ssZ. T indicates start time and Z a time zone offset.

end_time

String

Definition

Backup end time

Constraints

The value is in the format of yyyy-mm-ddThh:mm:ssZ. T indicates start time and Z a time zone offset.

database_tables

Array of objects

Definition

Database and table information in the backup. For details, see Table 7.

Constraints

  • Keep this parameter empty or ignore it when you query an instance backup.
  • Specify this parameter when you query a database or table backup (if any).
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

Table 7 QueryDatabaseTableInfo

Parameter

Type

Description

database_name

String

Definition

Database name.

Range

N/A

table_names

Array of strings

Definition

Table names.

  • If this parameter is empty, database names are queried.
  • If this parameter is not empty, table names are queried.

Example Requests

  • URI example
    GET https://gaussdb-nosql.ap-southeast-1.myhuaweicloud.com/v3.1/
    054b61972980d4552f0bc00ac8d3f5cd/backups?instance_id=c0c9f155c7b7423a9d30f0175998b63bin01&offset=2&limit=2&begin_time=2019-05-27T03:38:51+0000&end_time=2019-05-28T03:38:51+0000&type=DatabaseTable
  • Example request body

    None

Example Responses

Status code: 202

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" : "2019-05-27T03:38:51+0000", 
    "end_time" : "2019-05-27T03:39:51+0000", 
    "status" : "COMPLETED", 
    "size" : 2803, 
    "description" : "backup description", 
    "database_tables" : [ { 
      "database_name" : "DATABASE_X", 
      "table_names" : [ "TABLE_A", "TABLE_B", "TABLE_C" ] 
    }, { 
      "database_name" : "DATABASE_Y", 
      "table_names" : null 
    } ] 
  }, { 
    "id" : "43e4feaab48f11e89039fa163ebaa7e4br02", 
    "name" : "backup-test-2", 
    "instance_id" : "43e4feaab48f11e89039fa163ebaa7e4br02", 
    "instance_name" : "cluster-test", 
    "datastore" : { 
      "type" : "cassandra", 
      "version" : "3.4" 
    }, 
    "type" : "Manual", 
    "begin_time" : "2019-05-27T03:38:51+0000", 
    "end_time" : "2019-05-27T03:39:51+0000", 
    "status" : "COMPLETED", 
    "size" : 2803, 
    "description" : "backup description", 
    "database_tables" : [ { 
      "database_name" : "DATABASE_X", 
      "table_names" : [ "TABLE_A", "TABLE_B", "TABLE_C" ] 
    }, { 
      "database_name" : "DATABASE_Y", 
      "table_names" : null 
    } ] 
  } ] 
}

Status Codes

For details, see Status Codes.

Error Codes

For details, see Error Codes.