Query Database Backup

GET/zstack/v1/database-backups
GET/zstack/v1/database-backups/{uuid}

Headers

Authorization: OAuth the-session-uuid

Curl Example

curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/database-backups?q=uuid=9f5010336a233d6ebbd82594a6d56e7c
curl -H "Content-Type: application/json;charset=UTF-8" \
-H "Authorization: OAuth b86c9016b4f24953a9edefb53ca0678c" \
-X GET http://localhost:8080/zstack/v1/database-backups/296a7da913333dd992d89bf30d9304ed

Queryable Fields

Run the CLI command line tool, enter QueryDatabaseBackup and press the Tab key to view all queryable fields and cross-table queryable resource names.

API Response

Response Example

{
  "inventories": [
    {
      "uuid": "742a7c7d4a4f3a01b206632a40ac414f",
      "name": "db-backup",
      "description": "db-backup",
      "size": 13107.0
    }
  ]
}
NameTypeDescriptionStarting Version
errorErrorCodeThe error code. If not null, the operation failed. This field is null on success. For details, see error3.0.0
inventoriesListFor details, see inventories3.0.0

error

NameTypeDescriptionStarting Version
codeStringThe error code number. A globally unique identifier for the error, for example, SYS.1000, HOST.10013.0.0
descriptionStringA brief description of the error3.0.0
detailsStringThe detailed error information3.0.0
elaborationStringReserved field. Default is null3.0.0
opaqueLinkedHashMapReserved field. Default is null3.0.0
causeErrorCodeThe root error. The source error that caused the current error. This field is null if there is no root error3.0.0

inventories

NameTypeDescriptionStarting Version
uuidStringThe UUID of the resource. Uniquely identifies the resource3.0.0
nameStringResource name3.0.0
descriptionStringDetailed description of the resource3.0.0
stateString 3.0.0
statusString 3.0.0
sizeLong 3.0.0
metadataString 3.0.0
createDateTimestampCreation time3.0.0
lastOpDateTimestampLast modification time3.0.0
backupStorageRefsListFor details, see backupStorageRefs3.0.0

backupStorageRefs

NameTypeDescriptionStarting Version
databaseBackupUuidString 3.0.0
backupStorageUuidStringImage Storage UUID3.0.0
installPathString 3.0.0
exportUrlString 3.0.0
statusString 3.0.0
createDateTimestampCreation time3.0.0
lastOpDateTimestampLast modification time3.0.0

SDK Examples

Java SDK

QueryDatabaseBackupAction action = new QueryDatabaseBackupAction();
action.conditions = asList("uuid=74b420b3e877354e832a900915aab41a");
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c";
QueryDatabaseBackupAction.Result res = action.call();

Python SDK

QueryDatabaseBackupAction action = QueryDatabaseBackupAction()
action.conditions = ["uuid=b11af605703231b4a898bed3fb7d94c0"]
action.sessionId = "b86c9016b4f24953a9edefb53ca0678c"
QueryDatabaseBackupAction.Result res = action.call()