
# 查询录屏记录列表 - ListScreenRecords
#### 功能介绍
查询录屏记录列表。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/Workspace/doc?api=ListScreenRecords)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-workspace/workspace_09_0128.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                         | 访问级别 | 资源类型（\*为必须） | 条件键 | 别名 | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | workspace:screenRecord:list | List | -           | -   | -  | -      |
     
  
 
#### URI
GET /v2/{project_id}/screen-records
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述    |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID。 |
   
表2Query参数 
| 参数            | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|:---|:---|:---|:---|
| limit         | 否    | Integer | 用于分页查询，返回录屏记录数量的限制。默认100。范围0\~1000。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| offset        | 否    | Integer | 用于分页查询，查询的起始记录序号，从0开始。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| desktop_id    | 否    | String  | 根据桌面ID过滤结果。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| desktop_names | 否    | String  | 桌面名称列表，多个名称用英文逗号分割，最多支持100个桌面名称                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               |
| username      | 否    | String  | 根据用户名称过滤结果。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| status        | 否    | String  | 录屏状态。 - RECORDING：录制中。   - REC_COMPLETED：录制完成。   - UPLOADING：上传中。   - UPLOAD_COMPLETED：上传完成。    |
| type          | 否    | String  | 录屏类型。 - FULL：全程录屏。   - INTERVAL：间隔录屏。   - OPERATION：用户操作录屏。   - SESSION：监听会话生命周期录屏。             |
| start_time    | 否    | String  | 开始时间，格式为yyyy-MM-dd HH:mm:ss（UTC时间，不传查默认最近15天）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| end_time      | 否    | String  | 结束时间，格式为yyyy-MM-dd HH:mm:ss（UTC时间，不传查默认最近15天）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| sort_field    | 否    | String  | 用于排序，表示按照哪个字段排序。取值为录屏属性start_time字段。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| sort_type     | 否    | String  | 用于排序，表示升序还是降序，取值为asc和desc。与sort_field一起组合使用。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数             | 参数类型                                                                                   | 描述    |
|:---|:---|:---|
| screen_records | Array of [ScreenRecordDetail] objects | 录屏记录。 |
| total_count    | Integer                                                                                | 总数。   |
   
 表4ScreenRecordDetail 
| 参数                | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|:---|:---|:---|
| id                | String  | 主键UUID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| desktop_id        | String  | 桌面ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| desktop_name      | String  | 桌面名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| desktop_pool_id   | String  | 桌面池ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
| username          | String  | 用户名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| size              | Integer | 文件大小（Byte）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| type              | String  | 录屏类型。 - FULL：全程录屏。   - INTERVAL：间隔录屏。   - OPERATION：用户操作录屏。   - SESSION：监听会话生命周期录屏。                                                                                                                                                                                                                                                                                                                            |
| status            | String  | 录屏状态。 - RECORDING：录制中。   - REC_COMPLETED：录制完成。   - REC_FAILED：录制失败。   - UPLOADING：上传中。   - UPLOAD_COMPLETED：上传完成。   - UPLOAD_FAILED：上传失败。    |
| policy_id         | String  | 策略ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| obs_bucket        | String  | OBS桶名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| file_directory    | String  | 文件目录。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| video_filename    | String  | 录屏文件名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| video_file_sha256 | String  | 录屏文件sha256。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| event_filename    | String  | 事件文件名称。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| event_file_sha256 | String  | 事件文件sha256。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| start_time        | String  | 开始时间（2024-10-15T10:04:41.263Z）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| end_time          | String  | 结束时间（2024-10-15T11:04:41.263Z）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| update_time       | String  | 更新时间（2024-10-15T11:04:41.263Z）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| duration          | Integer | 视频时长（秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| upload_type       | String  | 上传类型。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
| site_type         | String  | 站点类型。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
   
**状态码：400**
表5响应Body参数 
| 参数                            | 参数类型   | 描述                                                           |
|:---|:---|:---|
| error_code                    | String | 错误码。                                                         |
| error_msg                     | String | 错误描述。                                                        |
| error_detail                  | String | 错误详情。                                                        |
| encoded_authorization_message | String | 加密后的详细拒绝原因，用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
   
**状态码：401**
表6响应Body参数 
| 参数                            | 参数类型   | 描述                                                           |
|:---|:---|:---|
| error_code                    | String | 错误码。                                                         |
| error_msg                     | String | 错误描述。                                                        |
| error_detail                  | String | 错误详情。                                                        |
| encoded_authorization_message | String | 加密后的详细拒绝原因，用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
   
**状态码：403**
表7响应Body参数 
| 参数                            | 参数类型   | 描述                                                           |
|:---|:---|:---|
| error_code                    | String | 错误码。                                                         |
| error_msg                     | String | 错误描述。                                                        |
| error_detail                  | String | 错误详情。                                                        |
| encoded_authorization_message | String | 加密后的详细拒绝原因，用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
   
**状态码：404**
表8响应Body参数 
| 参数                            | 参数类型   | 描述                                                           |
|:---|:---|:---|
| error_code                    | String | 错误码。                                                         |
| error_msg                     | String | 错误描述。                                                        |
| error_detail                  | String | 错误详情。                                                        |
| encoded_authorization_message | String | 加密后的详细拒绝原因，用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
   
**状态码：405**
表9响应Body参数 
| 参数                            | 参数类型   | 描述                                                           |
|:---|:---|:---|
| error_code                    | String | 错误码。                                                         |
| error_msg                     | String | 错误描述。                                                        |
| error_detail                  | String | 错误详情。                                                        |
| encoded_authorization_message | String | 加密后的详细拒绝原因，用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
   
**状态码：500**
表10响应Body参数 
| 参数                            | 参数类型   | 描述                                                           |
|:---|:---|:---|
| error_code                    | String | 错误码。                                                         |
| error_msg                     | String | 错误描述。                                                        |
| error_detail                  | String | 错误详情。                                                        |
| encoded_authorization_message | String | 加密后的详细拒绝原因，用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
   
**状态码：503**
表11响应Body参数 
| 参数                            | 参数类型   | 描述                                                           |
|:---|:---|:---|
| error_code                    | String | 错误码。                                                         |
| error_msg                     | String | 错误描述。                                                        |
| error_detail                  | String | 错误详情。                                                        |
| encoded_authorization_message | String | 加密后的详细拒绝原因，用户可以自行调用STS服务的decode-authorization-message接口进行解密。 |
   
#### 请求示例
```
GET /v2/089b2f9a3d80d3062f24c00ca4ed5cbd/screen-records
```
#### 响应示例
**状态码：200**
查询录屏记录列表的响应。
```
{
  "total_count" : 2,
  "screen_records" : [ {
    "id" : "8ac225c2781f230a01781f29b2e7xxxx",
    "desktop_id" : "7f1ac068-xxxx-xxxx-xxxx-535f4b315958",
    "desktop_name" : "desktop01",
    "desktop_pool_id" : "3cjh2068-xxxx-xxxx-xxxx-535f4b315364",
    "username" : "chenxxx",
    "status" : "已上传",
    "type" : "全程录屏",
    "size" : 546,
    "video_filename" : "video_089b2f9a3d80d3062f24c00ca4ed5cbd_wanghaha_xxxxx.mp4",
    "event_filename" : "video_089b2f9a3d80d3062f24c00ca4ed5cbd_wanghaha_xxxxx.mp4",
    "start_time" : "2024-03-12 12:02:01",
    "end_time" : "2024-03-12 12:52:01",
    "update_time" : "2024-03-12 12:58:34",
    "duration" : 3000
  }, {
    "id" : "8ac225c2781edb0d01781edde3f4xxxx",
    "desktop_id" : "7f1ac068-xxxx-xxxx-xxxx-535f4b315959",
    "desktop_name" : "desktop02",
    "desktop_pool_id" : "d3b82068-xxxx-xxxx-xxxx-535f4b315f3j",
    "username" : "wanghaha",
    "status" : "已上传",
    "type" : "间隔录屏",
    "size" : 639,
    "video_filename" : "video_089b2f9a3d80d3062f24c00ca4ed5cbd_wanghaha_yyyyy.mp4",
    "event_filename" : "video_089b2f9a3d80d3062f24c00ca4ed5cbd_wanghaha_yyyyy.mp4",
    "start_time" : "2024-09-30 11:02:06",
    "end_time" : "2024-09-30 12:02:26",
    "update_time" : "2024-09-30 13:06:12",
    "duration" : 3620
  } ]
}
```
#### 状态码
| 状态码 | 描述                      |
|:---|:---|
| 200 | 查询录屏记录列表的响应。            |
| 400 | 由于包含语法错误，当前请求无法被服务器理解。  |
| 401 | 鉴权失败。                   |
| 403 | 没有操作权限。                 |
| 404 | 找不到资源。                  |
| 405 | 请求中指定的方法不被允许。           |
| 500 | 服务内部错误，具体返回错误码请参见错误码说明。 |
| 503 | 服务不可用。                  |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-workspace/ErrorCode.html)。
