
# 查询桌面关键事件列表 - ListDesktopOperations
#### 功能介绍
查询桌面关键事件列表。
#### 调试
您可以在[API Explorer](https://console.huaweicloud.com/apiexplorer/#/openapi/Workspace/doc?api=ListDesktopOperations)中调试该接口，支持自动认证鉴权。API Explorer可以自动生成SDK代码示例，并提供SDK代码示例调试功能。
#### 授权信息
账号具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备调用API所需的权限。
- 如果使用角色与策略授权，具体权限要求请参见[权限和授权项](https://support.huaweicloud.com/api-workspace/workspace_09_0128.html)。
- 如果使用身份策略授权，需具备如下身份策略权限。
  
  | 授权项                                   | 访问级别 | 资源类型（\*为必须） | 条件键 | 别名 | 依赖的授权项 |
  |:---|:---|:---|:---|:---|:---|
  | workspace:screenRecord:listOperations | List | -           | -   | -  | -      |
     
  
 
#### URI
GET /v2/{project_id}/screen-records/{record_id}/os-operations
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述        |
|:---|:---|:---|:---|
| project_id | 是    | String | 项目ID。     |
| record_id  | 是    | String | 录屏记录UUID。 |
   
表2Query参数 
| 参数          | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|:---|
| event_type  | 否    | String  | 事件类型。 - APP：应用监控。   - FILE：文件监控。   - REG：注册表监控。   - HDP：协议行为监控。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| event_id    | 否    | String  | 事件ID。 - APP_START：应用程序启动   - APP_STOP：应用程序结束   - APP_CRASH：应用程序异常退出   - APP_HANG：应用程序无响应   - APP_INSTALL：应用安装   - APP_UNINSTALL：应用卸裁   - FILE_CREATE：文件创建   - FILE_DELETE：文件删除   - FILE_RENAME：文件改名   - HDP_FILE：文件重定向   - HDP_USB：USB插拔事件   - HDP_CLIPBOARD：剪切板操作   - HDP_INPUTIDLE：空闲无操作   - HDP_PRINT：文件打印    |
| event_level | 否    | String  | 事件级别。 - INFO：提示。   - ALARM：告警。   - ERROR：异常。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| event_data  | 否    | String  | 事件内容。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| limit       | 否    | Integer | 用于分页查询，返回录屏记录数量的限制。默认100。范围0\~1000。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
| offset      | 否    | Integer | 用于分页查询，查询的起始记录序号，从0开始。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数          | 参数类型                                                                                   | 描述    |
|:---|:---|:---|
| operations  | Array of [OperationForList] objects | 操作记录。 |
| total_count | Integer                                                                                | 总数。   |
   
 表4OperationForList 
| 参数                  | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|:---|:---|:---|
| id                  | String  | 主键UUID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| project_id          | String  | 项目ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| desktop_id          | String  | 桌面ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| screen_record_id    | String  | 录屏记录ID。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| username            | String  | 用户名。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
| event_type          | String  | 事件类型。 - APP：应用监控。   - FILE：文件监控。   - REG：注册表监控。   - HDP：协议行为监控。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| event_level         | String  | 事件级别。 - INFO：提示。   - ALARM：告警。   - ERROR：异常。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| event_id            | String  | 事件ID。 - APP_START：应用程序启动   - APP_STOP：应用程序结束   - APP_CRASH：应用程序异常退出   - APP_HANG：应用程序无响应   - APP_INSTALL：应用安装   - APP_UNINSTALL：应用卸裁   - FILE_CREATE：文件创建   - FILE_DELETE：文件删除   - FILE_RENAME：文件改名   - HDP_FILE：文件重定向   - HDP_USB：USB插拔事件   - HDP_CLIPBOARD：剪切板操作   - HDP_INPUTIDLE：空闲无操作   - HDP_PRINT：文件打印    |
| event_data          | String  | 事件内容。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| operation_time      | String  | 操作时间（2024-10-15T11:04:41.263Z）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| relative_start_time | Integer | 相对于视频开始的时间（秒）。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
**状态码：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/6c655e6a-xxxx-xxxx-xxxx-b7f0edc7a082/os-operations
```
#### 响应示例
**状态码：200**
查询桌面关键事件列表。
```
{
  "total_count" : 2,
  "operations" : [ {
    "id" : "8ac225c2781f230a01781f29b2e7xxxx",
    "desktop_id" : "7f1ac068-xxxx-xxxx-xxxx-535f4b315958",
    "screen_record_id" : "7f1ac068-xxxx-xxxx-xxxx-535f4b31111",
    "username" : "chenxxx",
    "event_type" : "APP",
    "event_level" : "提示",
    "event_id" : "APP_START",
    "event_data" : "启动welink",
    "operation_time" : "2024-03-12 12:02:01",
    "relative_start_time" : 16
  }, {
    "id" : "8ac225c2781edb0d01781edde3f4xxxx",
    "desktop_id" : "7f1ac068-xxxx-xxxx-xxxx-535f4b315959",
    "screen_record_id" : "7f1ac068-xxxx-xxxx-xxxx-535f4b32222",
    "username" : "wanghaha",
    "event_type" : "FILE",
    "event_level" : "异常",
    "event_id" : "FILE_DELETE",
    "event_data" : "删除文件",
    "operation_time" : "2024-03-12 12:02:01",
    "relative_start_time" : 16
  } ]
}
```
#### 状态码
| 状态码 | 描述                      |
|:---|:---|
| 200 | 查询桌面关键事件列表。             |
| 400 | 由于包含语法错误，当前请求无法被服务器理解。  |
| 401 | 鉴权失败。                   |
| 403 | 没有操作权限。                 |
| 404 | 找不到资源。                  |
| 405 | 请求中指定的方法不被允许。           |
| 500 | 服务内部错误，具体返回错误码请参见错误码说明。 |
| 503 | 服务不可用。                  |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-workspace/ErrorCode.html)。
