
# 查询备份详细信息列表（OpenStack原生）（废弃）
#### 功能介绍
查询备份详细信息列表。此接口已废弃。
#### URI
- URI格式 GET /v2/{project_id}/backups/detail
  
- 参数说明
  
  | 参数         | 是否必选 | 描述                                                                                                                                  |
  |:---|:---|:---|
  | project_id | 是    | 项目ID。 获取项目ID方法请参考 [获取项目ID](https://support.huaweicloud.com/api-vbs/zh-cn_topic_0136271365.html) |
     
  
- Request filter参数说明
  
  | 参数        | 是否必选 | 参数类型   | 描述                                                                                                                       |
  |:---|:---|:---|:---|
  | name      | 否    | string | 指定查询的备份名称。用于过滤名称为指定字符串的备份。                                                                                               |
  | status    | 否    | string | 指定查询的备份状态。用于过滤特定状态的备份。可选的值目前只支持："available"，"error"，"restoring"，"creating"，"deleting"，"error_restoring"。                 |
  | sort_key  | 否    | string | 按属性排序。有效值为name、status、container_format、disk_format、size、id、created_at、updated_at。默认值为created_at。API使用sort_key属性值的自然排序方向。 |
  | sort_dir  | 否    | string | 按一组或多组属性和排序方向组合排序。如果省略组合中的排序方向，则默认为desc。                                                                                 |
  | offset    | 否    | int    | 指定查询信息列表的偏移量。                                                                                                            |
  | limit     | 否    | int    | 指定返回结果个数限制。                                                                                                              |
  | volume_id | 否    | string | 指定查询备份的磁盘ID。用于过滤指定磁盘ID对应的备份。                                                                                             |
     
  
- 请求示例
  ```
  GET /v2/{project_id}/backups/detail?name=backup&status=error&limit=10&volume_id=7d7c6fbe-d7ee-4b4d-8bae-bdd08b5604bb
  ```
  
  
 
#### 请求
无
#### 响应
- 要素说明
  
  | 参数                           | 参数类型         | 描述                                                       |
  |:---|:---|:---|
  | backups                      | list\<dict\> | 查询请求返回的备份列表。                                             |
  | status                       | string       | 备份状态。                                                    |
  | description                  | string       | 备份描述。                                                    |
  | links                        | list\<dict\> | 备份URL。                                                   |
  | availability_zone            | string       | 备份所在的可用分区。                                               |
  | volume_id                    | string       | 备份源磁盘ID。                                                 |
  | fail_reason                  | string       | 备份失败的原因。                                                 |
  | id                           | string       | 备份ID。                                                    |
  | size                         | int          | 备份大小。                                                    |
  | object_count                 | int          | 磁盘数据在对象存储上对应的对象数量。                                       |
  | container                    | string       | 备份所在的容器。                                                 |
  | name                         | string       | 备份名称。                                                    |
  | created_at                   | string       | 备份创建的时间。                                                 |
  | os-bak-tenant-attr:tenant_id | string       | 卷备份所属的项目ID。                                              |
  | service_metadata             | string       | 备份的元数据。                                                  |
  | updated_at                   | string       | 更新时间                                                     |
  | data_timestamp               | string       | 当前时间                                                     |
  | has_dependent_backups        | boolean      | 是否有依赖的备份，VBS默认首次全量备份，后续增量备份，故该参数无实际作用。                   |
  | snapshot_id                  | string       | 关联的快照ID                                                  |
  | is_incremental               | boolean      | 是否是增量备份，VBS默认首次全量备份，后续增量备份，故该参数无实际作用。                    |
  | backups_links                | list\<dict\> | 表示当前的查询方式下只查询了该租户的一部分备份信息，比如当指定了limit表分页查询或备份个数超过1000个时。 |
  | href                         | string       | 表示本次查询的最后一个备份的url信息                                      |
  | rel                          | string       | rel表示本次查询结果和当前href的关系，next表示还有未查询出来的备份                   |
     
  
- service_metadata参数说明
  
  | 参数        | 参数类型    | 描述                                                    |
  |:---|:---|:---|
  | DL        | int     | 0:非重删+非压缩；1：重删+非压缩；2：非重删+压缩；3：重删+压缩。无此键时为0（非重删+非压缩）   |
  | VK        | string  | 加密卷的加密VK,长度为64字符                                      |
  | bootable  | boolean | 是否为启动卷                                                |
  | backupurl | string  | 备份系统上的备份映像ID                                          |
  | SP        | string  | 备份映像在存储单元的路径名                                         |
  | VMID      | string  | 备份映像所属的虚拟机ID                                          |
  | ST        | int     | 备份服务类型：0:卷备份，1: 整机备份，4:卷备份的复制副本，5:整机备份的复制副本。无此tag为卷备份 |
  | BT        | int     | 备份存储类型                                                |
  | SS        | int     | 空间节省率                                                 |
  | BP        | string  | 存储单元路径                                                |
  | CMKID     | string  | 加密卷的CMKID,内容为UUID，长度为36字符                             |
  | progress  | int     | 备份进度                                                  |
  | CS        | int     | 该备份所在Chain的所有备份数据总和，单位MB                              |
  | VT        | string  | 生产存储卷类型                                               |
  | OMID      | string  | 任务执行节点的主机 id                                          |
  | Type      | int     | 备份类型：0：全量备份，1：增量备份                                    |
  | ebk_T_I   | string  | 备份系统的任务ID                                             |
  | AT        | float   | 平均速率(Average Throughput)，单位MB/s,小数点后保留一位              |
     
  
- description参数说明
  
  | 参数   | 参数类型   | 描述                        |
  |:---|:---|:---|
  | DESC | string | 备份描述                      |
  | INC  | int    | 备份请求是否是增量备份，1：增量备份，0：全量备份 |
     
  
- 响应样例
  ```
  {
  "backups": [
  {
  "status": "error",
  "description": null,
  "links": [
  {
  "href": "http://192.168.82.222:8776/v2/b23b579f08c84228b9b4673c46f0c442/backups/1d1139d8-8989-49d3-8aa1-83eb691e6db2",
  "rel": "self"
  },
  {
  "href": "http://192.168.82.222:8776/b23b579f08c84228b9b4673c46f0c442/backups/1d1139d8-8989-49d3-8aa1-83eb691e6db2",
  "rel": "bookmark"
  }
  ],
  "availability_zone": null,
  "volume_id": "2748f2f2-4394-4e6e-af8d-8dd34496c024",
  "fail_reason": "Connection to swift failed: [Errno 111] ECONNREFUSED",
  "id": "1d1139d8-8989-49d3-8aa1-83eb691e6db2",
  "size": 1,
  "object_count": null,
  "container": "volumebackups",
  "name": null,
  "created_at": "2013-06-27T08:48:03.000000",
  "os-bak-tenant-attr:tenant_id": "b23b579f08c84228b9b4673c46f0c442",
  "service_metadata": " {\"bootable\": false, \"backupurl\": \"58d94782-6509-45ad-9442-970d2a005050\", \"BackupSize\": 0, \"progress\": \"0\", \"snap_id\": \"665e411f5d87431ca98c199fbd4a64fd\", \"Type\": 0} "
  },
  {
  "status": "error",
  "description": null,
  "links": [
  {
  "href": "http://192.168.82.222:8776/v2/b23b579f08c84228b9b4673c46f0c442/backups/80e17946-6e56-46e0-9547-e9ba4f1619bd",
  "rel": "self"
  },
  {
  "href": "http://192.168.82.222:8776/b23b579f08c84228b9b4673c46f0c442/backups/80e17946-6e56-46e0-9547-e9ba4f1619bd",
  "rel": "bookmark"
  }
  ],
  "availability_zone": null,
  "volume_id": "2748f2f2-4394-4e6e-af8d-8dd34496c024",
  "fail_reason": "Connection to swift failed: [Errno 111] ECONNREFUSED",
  "id": "80e17946-6e56-46e0-9547-e9ba4f1619bd",
  "size": 1,
  "object_count": null,
  "container": "volumebackups",
  "name": null,
  "created_at": "2013-06-27T08:56:58.000000"
  },
  {
  "status": "error",
  "description": null,
  "links": [
  {
  "href": "http://192.168.82.222:8776/v2/b23b579f08c84228b9b4673c46f0c442/backups/b3cf7a16-decc-4beb-8077-682737d94a58",
  "rel": "self"
  },
  {
  "href": "http://192.168.82.222:8776/b23b579f08c84228b9b4673c46f0c442/backups/b3cf7a16-decc-4beb-8077-682737d94a58",
  "rel": "bookmark"
  }
  ],
  "availability_zone": null,
  "volume_id": "2748f2f2-4394-4e6e-af8d-8dd34496c024",
  "fail_reason": "Connection to swift failed: [Errno 111] ECONNREFUSED",
  "id": "b3cf7a16-decc-4beb-8077-682737d94a58",
  "size": 1,
  "object_count": null,
  "container": "volumebackups",
  "name": null,
  "created_at": "2013-06-27T08:46:31.000000"
  }
  ],
  "backups_links": [
      {
        "href": "http://192.168.82.222:8776/b23b579f08c84228b9b4673c46f0c442/backups?limit=1&offset=1&marker=b3cf7a16-decc-4beb-8077-682737d94a58",
        "rel": "next"
      }
    ]
  }
  ```
  
 
#### 状态码
- 正常 200
  
- 异常
  
  | 状态码                               | 说明                           |
  |:---|:---|
  | 400 Bad Request                   | 服务器未能处理请求。                   |
  | 401 Unauthorized                  | 被请求的页面需要用户名和密码。              |
  | 403 Forbidden                     | 对被请求页面的访问被禁止。                |
  | 404 Not Found                     | 服务器无法找到被请求的页面。               |
  | 405 Method Not Allowed            | 请求中指定的方法不被允许。                |
  | 406 Not Acceptable                | 服务器生成的响应无法被客户端所接受。           |
  | 407 Proxy Authentication Required | 用户必须首先使用代理服务器进行验证，这样请求才会被处理。 |
  | 408 Request Timeout               | 请求超出了服务器的等待时间。               |
  | 409 Conflict                      | 由于冲突，请求无法被完成。                |
  | 500 Internal Server Error         | 请求未完成。服务异常。                  |
  | 501 Not Implemented               | 请求未完成。服务器不支持所请求的功能。          |
  | 502 Bad Gateway                   | 请求未完成。服务器从上游服务器收到一个无效的响应。    |
  | 503 Service Unavailable           | 请求未完成。系统暂时异常。                |
  | 504 Gateway Timeout               | 网关超时。                        |
     
  
 
#### 错误码
请参考[错误码](https://support.huaweicloud.com/api-vbs/zh-cn_topic_0022472083.html)。
