文档数据库服务
| Details
  • 查询API版本
    • ListApiVersion
    • ShowApiVersion
  • 引擎版本和规格
    • ListDatastoreVersions
    • ListFlavorInfos
    • ListFlavors
    • ListStorageType
  • 实例管理
    • AddReadonlyNode
    • AddShardingNode
    • AttachEip
    • AttachInternalIp
    • BatchUpgradeDatabaseVersion
    • CancelEip
    • ChangeOpsWindow
    • CheckWeakPassword
    • CreateInstance
    • CreateIp
    • DeleteInstance
    • DeleteLtsConfig
    • DeleteReadonlyNode
    • ExpandReplicasetNode
    • ListAz2Migrate
    • ListInstances
    • ListLtsConfigs
    • ListRecycleInstances
    • ListSslCertDownloadAddress
    • MigrateAz
    • ResizeInstance
    • ResizeInstanceVolume
    • RestartInstance
    • SetAutoEnlargePolicies
    • SetRecyclePolicy
    • ShowAutoEnlargePolicy
    • ShowClientNetwork
    • ShowDiskUsage
    • ShowRecyclePolicy
    • ShowReplSetName
    • ShowSecondLevelMonitoringStatus
    • ShowUpgradeDuration
    • ShrinkInstanceNodes
    • SwitchoverReplicaSet
    • SwitchSecondLevelMonitoring
    • SwitchSsl
    • UpdateClientNetwork
    • UpdateInstanceName
    • UpdateInstancePort
    • UpdateInstanceRemark
    • UpdateLtsConfig
    • UpdateReplSetName
    • UpdateSecurityGroup
    • UpgradeDatabaseVersion
  • 连接管理
    • DeleteSession
    • ListSessions
    • ShowConnectionStatistics
  • 备份与恢复
    • BatchDeleteBackup
    • CreateManualBackup
    • DeleteManualBackup
    • ListBackups
    • ListRestoreCollections
    • ListRestoreDatabases
    • ListRestoreTimes
    • RestoreInstance
    • RestoreInstanceFromCollection
    • RestoreNewInstance
    • SetBackupPolicy
    • ShowBackupDownloadLink
    • ShowBackupPolicy
    • StopBackup
  • 获取日志信息
    • DeleteAuditLog
    • DownloadErrorlog
    • DownloadSlowlog
    • ListAuditlogLinks
    • ListAuditlogs
    • ListErrorLogs
    • ListLtsErrorLogs
    • ListLtsSlowLogs
    • ListSlowLogs
    • SetAuditlogPolicy
    • ShowAuditlogPolicy
    • ShowSlowlogDesensitizationSwitch
    • SwitchSlowlogDesensitization
  • 标签管理
    • BatchTagAction
    • ListInstancesByTags
    • ListInstanceTags
    • ListProjectTags
  • 管理数据库和用户
    • CheckPassword
    • CreateDatabaseRole
    • CreateDatabaseUser
    • DeleteDatabaseRole
    • DeleteDatabaseUser
    • ListDatabaseRoles
    • ListDatabases
    • ListDatabaseUsers
    • ResetPassword
    • SetBalancerSwitch
    • SetBalancerWindow
    • ShowShardingBalancer
  • 参数配置
    • CompareConfiguration
    • CopyConfiguration
    • CreateConfiguration
    • DeleteConfiguration
    • ListAppliedInstances
    • ListConfigurations
    • ResetConfiguration
    • ShowConfigurationAppliedHistory
    • ShowConfigurationModifyHistory
    • ShowConfigurationParameter
    • ShowEntityConfiguration
    • ShowInstanceConfigurationModifyHistory
    • SwitchConfiguration
    • UpdateConfigurationParameter
    • UpdateEntityConfiguration
    • ValidateConfigurationName
  • 配额管理
    • ShowQuotas
  • 任务管理
    • ListTasks
    • ShowJobDetail
  • 数据库运维
    • CreateKillOpRule
    • DeleteKillOpRuleList
    • ShowKillOpRuleRuleList
    • SwitchInstancePrimary
    • UpdateKillOpRule
  • 定时任务
    • CancelScheduledTask
    • ListScheduledTasks

ListBackups

GET
https://dds.af-south-1.myhuaweicloud.com/v3/{project_id}/backups
Advanced
Required parameters only
Default
Encrypt sensitive parameters
*
Region
Headers
*
Authorization
Parameters
*
project_id
*
instance_id
*
backup_id
*
backup_type
*
offset
*
limit
*
begin_time
*
end_time
*
mode
API Description

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

URL
GET  https://dds.af-south-1.myhuaweicloud.com/v3/{project_id}/backups
Request Parameters
NameTypeINMandatoryDescription
x-auth-token
stringheader Yes

Specifies the user token obtained from the IAM service.

project_id
stringpath Yes

Specifies the project ID of a tenant in a region.

mode
stringquery No

Specifies the DB instance mode. Valid value:

  • Sharding
  • ReplicaSet
  • Single
end_time
stringquery No

Specifies the end time of the query. The format is "yyyy-mm-dd hh:mm:ss". The value is in UTC format. When begin_time is not empty, end_time is mandatory.

begin_time
stringquery No

Specifies the start time of the query. The format is yyyy-mm-dd hh:mm:ss. The value is in UTC format. When end_time is not empty, begin_time is mandatory.

limit
integerquery No

Specifies the maximum allowed number of backups to be queried. The value ranges from 1 to 100. If this parameter is not transferred, the first 100 DB instances are queried by default.

offset
integerquery No

Specifies the index position. The query starts from the next instance 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. The value must be greater than or equal to 0. If this parameter is not transferred, offset is set to 0 by default, indicating that the query starts from the latest created DB instance.

backup_type
stringquery No

Specifies the backup type.

  • Auto: indicates automated full backup.
  • Manual: indicates manual full backup.
  • Incremental: indicates automated incremental backup.
  • If this parameter is not transferred, all full backups, including automated and manual full backups, are queried by default. When the value of this field is Incremental, the instance ID must be transferred.
backup_id
stringquery No

Specifies the backup ID.

  • If the backup ID belongs to an automated incremental backup, the instance ID must be specified.
instance_id
stringquery No

Specifies the instance ID, which can be obtained by calling the API for querying instances and details. If you do not have an instance, you can call the API used for creating an instance.

Response Parameters
Status code: 200

Success.

NameTypeDescription
backups
Array of BackupForList objects

Indicates the backup list.

total_count
integer

Indicates the total number of queried records.

200 backups
NameTypeDescription
id
string

Indicates the backup ID.

name
string

Indicates the backup name.

instance_id
string

Indicates the ID of the DB instance from which the backup was created. You can obtain the ID by calling the API for querying DB instances. If you do not have an instance, you can call the API used for creating an instance.

instance_name
string

Indicates the name of the DB instance for which the backup is created.

datastore
BackupDatabase object

Indicates the database version.

type
string

Indicates the backup type.

  • Auto: indicates automated full backup.
  • Manual indicates manual full backup.
  • Incremental: indicates automated incremental backup.
begin_time
string

Indicates the backup start time. The format of the start time is yyyy-mm-dd hh:mm:ss. The value is in UTC format.

end_time
string

Indicates the backup end time. The format of the end time is yyyy-mm-dd hh:mm:ss. The value is in UTC format.

status
string

Indicates the backup status. Valid value:

  • BUILDING: Backup in progress
  • COMPLETED: Backup completed
  • FAILED: Backup failed
  • DISABLED: Backup being deleted
size
long

Indicates the backup size in KB.

description
string

Indicates the backup description.

200 backups.datastore
NameTypeDescription
type
string

Indicates the DB engine. Valid value: DDS-Community or DDS-Enhanced.

version
string

Indicates the database of version 3.4 or later. The value is 3.4, 4.0, 4.2, 4.4 or 5.0.

Status code: default

Client or server error.

NameTypeDescription
error_code
string

Specifies the error returned when a task submission exception occurs.

error_msg
string

Specifies the description of the error returned when a task submission exception occurs.

Example Request
Example 1
"GET https://{endpoint}/v3/054e292c9880d4992f02c0196d3ea468/backups?instance_id=a48e43ff268f4c0e879652d65e63d0fbin02"
Example Response
Status code: 200

Success.

Example 1
{
"backups": [
{
"id ": "43e4feaab48f11e89039fa163ebaa7e4br02",
"name": "backup-test",
"instance_id": "43e4feaab48f11e89039fa163ebaa7e4in02",
"instance_name": "cluster-test",
"datastore": {
"type": "DDS-Community",
"version": 3.2
},
"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"
}
],
"total_count": 1
}
SDK
Click 文档数据库服务 (DDS) SDK to download the SDK in your programming language or view the SDK documentation. To learn how to install an SDK and perform authentication, read Usage.
Error Code

Outline

API Description
URL
Request Parameters
Response Parameters
Example Request
Example Response
SDK
Error Code