查询备份列表
更新时间:2023-09-22
查询备份列表
接口描述
本接口用于查询备份列表。
请求结构
                Plain Text
                
            
            1GET /v{version}/gaiadb/{clusterId}/snapshot HTTP/1.1
2HOST: gaiadb.bj.baidubce.com
3Authorization: authorization string
            请求头域
除公共头域外,无其它特殊头域。
请求参数
| 参数名称 | 类型 | 是否必选 | 参数位置 | 描述 | 
|---|---|---|---|---|
| version | String | 是 | URL参数 | API 版本号 | 
| clusterId | String | 是 | URL参数 | 集群ID | 
返回头域
除公共头域,无其它特殊头域。
返回参数
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| snapshots | List<Snapshot> | 由Database对象组成的数组 | 
Snapshot
| 参数名称 | 类型 | 描述 | 
|---|---|---|
| snapshotId | String | 备份ID | 
| appId | String | 实例ID | 
| snapshotSizeInBytes | String | 备份大小 | 
| snapshotType | String | manual(手动)、 automated(自动) | 
| snapshotStartTime | String | 开始备份时间 格式:年-月-日 时:分:秒 | 
| snapshotEndTime | String | 结束备份时间 格式:年-月-日 时:分:秒 | 
| snapshotDataTime | String | 备份时间 格式:年-月-日 时:分:秒 | 
请求示例
                Plain Text
                
            
            1GET /v1/gaiadb/gaiadbxxxxxx/database HTTP/1.1
2HOST: gaiadb.bj.baidubce.com
3Content-Type: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
            返回示例
                Plain Text
                
            
            1HTTP/1.1 200 OK
2Content-Type: application/json;charset=UTF-8
3x-bce-request-id: d8752367-38e8-45e4-b4c7-e53be3137ce5
4{
5    "snapshots": [{
6        "snapshotId": "1663587291685661501",
7        "appId": "gaiadbymbrc8",
8        "snapshotSizeInBytes": 0,
9        "snapshotType": "manual",
10        "snapshotStatus": "creating",
11        "snapshotStartTime": "2022-09-19T11: 35: 52Z",
12        "snapshotEndTime": "1970-01-01T00: 00: 01Z",
13        "snapshotDataTime": "1970-01-01T00: 00: 00Z"
14    },
15    {
16        "snapshotId": "1663482393627791501",
17        "appId": "gaiadbymbrc8",
18        "snapshotSizeInBytes": 35580212,
19        "snapshotType": "automated",
20        "snapshotStatus": "available",
21        "snapshotStartTime": "2022-09-18T06: 28: 44Z",
22        "snapshotEndTime": "2022-09-18T06: 43: 53Z",
23        "snapshotDataTime": "2022-09-18T06: 41: 25Z"
24    }]
25}
            