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.
URI
GET https://{Endpoint}/v3/{project_id}/backups
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Explanation: Project ID of a tenant in a region. To obtain this value, see Obtaining a Project ID. Constraints: N/A Values: N/A Default value: N/A |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
offset |
Yes |
Integer |
Explanation: Page number. Constraints: N/A Values: This value is greater than or equal to 1. Default value: N/A |
limit |
Yes |
Integer |
Explanation: Number of records on each page. Constraints: N/A Values: 1 to 100 Default value: N/A |
datastore_type |
No |
String |
Explanation: API type Values:
Default value: If this parameter is not transferred, all APIs are queried. |
type |
No |
String |
Explanation: Backup policy type Values:
Default value: Instance |
instance_id |
No |
String |
Explanation: Instance ID Constraints: N/A Values: N/A Default value: If this parameter is not transferred, all backups are queried. |
backup_id |
No |
String |
Explanation: Backup ID. Constraints: N/A Values: N/A Default value: If this parameter is not transferred, all backups are queried. |
backup_type |
No |
String |
Explanation: Backup type. Constraints: N/A Values:
Default value: N/A |
begin_time |
No |
String |
Explanation: Time when a backup query starts Constraints: The value is in UTC format. Values: The format is yyyy-mm-dd hh:mm:ss. Default value: N/A |
end_time |
No |
String |
Explanation: Time when a backup query ends Constraints: The value is in UTC format. Values: The format is yyyy-mm-dd hh:mm:ss. Default value: N/A |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
Yes |
String |
Explanation: User token You can obtain the token by calling the IAM API by following Obtaining a User Token Through Password Authentication. Constraints: N/A Values: N/A Default value: N/A |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
total_count |
Long |
Explanation: Total number of records. Values: N/A |
backups |
Array of objects |
Explanation: Backup list. For details, see Table 5. |
Parameter |
Type |
Description |
---|---|---|
id |
String |
Explanation: Backup ID. Values: N/A |
name |
String |
Explanation: Backup name. Values: N/A |
description |
String |
Explanation: Backup description. Values: N/A |
begin_time |
String |
Explanation: Backup start time Constraints: UTC time in the yyyy-mm-dd hh:mm:ss format |
end_time |
String |
Explanation: Backup end time Constraints: UTC time in the yyyy-mm-dd hh:mm:ss format |
status |
String |
Explanation: Backup status. Values:
|
size |
Double |
Explanation: Backup size, in KB. Values: N/A |
type |
String |
Explanation: Backup type Values:
|
instance_id |
String |
Explanation: Instance ID Values: N/A |
instance_name |
String |
Explanation: Instance name. Values: N/A |
datastore |
object |
Explanation: Database information. For details, see Table 6. |
Example Request
- 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
Example Response
Status code: 200
Successful request
{ "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.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot