Querying Backups
Function
This API is used to query backups based on specified conditions.
URI
GET /v4/{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  | 
     
|---|---|---|---|
| 
        instance_id  | 
      
        No  | 
      
        String  | 
      
        Explanation: Instance ID. To obtain the value, call the API by following Querying Instances and Details. If you do not have an instance, call the API by following Creating an Instance. Constraints: N/A Values: N/A Default value: N/A  | 
     
| 
        datastore_type  | 
      
        No  | 
      
        String  | 
      
        Explanation: Database type. The value can be: Constraints: N/A Values: 
 Default value: N/A  | 
     
| 
        backup_id  | 
      
        No  | 
      
        String  | 
      
        Explanation: Backup ID Constraints: N/A Values: N/A Default value: N/A  | 
     
| 
        backup_type  | 
      
        No  | 
      
        String  | 
      
        Explanation: Backup type Constraints: The value is case sensitive. Values: 
 Default value: If this parameter is not transferred, all automated and manual backups (including database- and table-level backups) are queried by default.  | 
     
| 
        type  | 
      
        No  | 
      
        String  | 
      
        Explanation: Backup policy type. Constraints: N/A Values: 
 Default value: Instance  | 
     
| 
        limit  | 
      
        No  | 
      
        Integer  | 
      
        Explanation: Maximum backup records to be queried. Constraints: N/A Values: 1 to 100 Default value: If this parameter is not transferred, the first 100 instances are queried by default.  | 
     
| 
        offset  | 
      
        No  | 
      
        Integer  | 
      
        Explanation: 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 Values: 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  | 
      
        Explanation: Time when a backup query starts Constraints: When end_time is not empty, begin_time is mandatory. Values: 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  | 
      
        Explanation: Time when a backup query ends Constraints: When begin_time is not empty, end_time is mandatory. Values: 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
| 
        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  | 
      
        Integer  | 
      
        Explanation: Total backups Values: N/A  | 
     
| 
        backups  | 
      
        Array of objects  | 
      
        Explanation: Backup details. For details, see Table 5.  | 
     
| 
        Parameter  | 
      
        Type  | 
      
        Description  | 
     
|---|---|---|
| 
        id  | 
      
        String  | 
      
        Explanation: Backup ID Values: N/A  | 
     
| 
        description  | 
      
        String  | 
      
        Explanation: Backup description Values: N/A  | 
     
| 
        instance_id  | 
      
        String  | 
      
        Explanation: ID of an instance that a backup is created for Values: N/A  | 
     
| 
        instance_name  | 
      
        String  | 
      
        Explanation: Name of an instance that a backup is created for Values: N/A  | 
     
| 
        datastore  | 
      
        object  | 
      
        Explanation: Database version. For details, see Table 6.  | 
     
| 
        name  | 
      
        String  | 
      
        Explanation: Backup name Values: N/A  | 
     
| 
        type  | 
      
        String  | 
      
        Explanation: Backup type Values: 
  | 
     
| 
        size  | 
      
        Double  | 
      
        Explanation: Backup size, in KB Values: N/A  | 
     
| 
        status  | 
      
        String  | 
      
        Explanation: Backup status. Values: 
  | 
     
| 
        begin_time  | 
      
        String  | 
      
        Explanation: 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  | 
      
        Explanation: 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  | 
      
        Explanation: Database and table information in a backup. For details, see Table 7. Constraints: 
  | 
     
Example Request
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" : "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.
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