# 查询浏览器会话列表 - ListCoreBrowserSessions
#### 功能介绍
该API用于查询浏览器会话列表。
#### 调用方法
请参见[如何调用API](https://support.huaweicloud.com/api-agentarts/agentarts_07_0003.html)。
#### 授权信息
账号根用户具备所有API的调用权限，如果使用账号下的IAM用户调用当前API，该IAM用户需具备如下身份策略权限，更多的权限说明请参见[权限和授权项](https://support.huaweicloud.com/api-agentarts/Permission.html)。
| 授权项                                       | 访问级别 | 资源类型（\*为必须） | 条件键                       | 别名 | 依赖的授权项 |
|:---|:---|:---|:---|:---|:---|
| agentarts:browser:listCoreBrowserSessions | List | browser \*  | g:ResourceTag/\<tag-key\> | -  | -      |
   
#### URI
GET /v1/core/browser/{browser_id}/sessions
表1路径参数 
| 参数         | 是否必选 | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|:---|:---|:---|:---|
| browser_id | 是    | String | **参数解释：** 浏览器ID，可通过查询浏览器列表接口获取。 **约束限制：** 必须为有效的UUID格式。 **取值范围：** 符合UUID正则\^\[0-9a-fA-F\]{8}-\[0-9a-fA-F\]{4}-\[0-9a-fA-F\]{4}-\[0-9a-fA-F\]{4}-\[0-9a-fA-F\]{12}$的36位字符串。 **默认取值：** 不涉及。 |
   
表2Query参数 
| 参数           | 是否必选 | 参数类型    | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        |
|:---|:---|:---|:---|
| limit        | 否    | Integer | **参数解释：** 分页查询时每页返回的记录数量，用于控制单次查询返回的数据量。 **约束限制：** 不涉及。 **取值范围：** 正整数，取值范围为1-1000。 **默认取值：** 1000。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| offset       | 否    | Integer | **参数解释：** 分页查询的偏移量，表示从第几条记录开始查询，用于分页场景。 **约束限制：** 不涉及。 **取值范围：** 非负整数，取值范围为0-100000。 **默认取值：** 0。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
| sort_key     | 否    | String  | **参数解释：** 排序字段。 **约束限制：** 不涉及。 **取值范围：** - created_at：按创建时间排序。   - updated_at：按更新时间排序。    **默认取值：** created_at。                                                                                                                                                                                                  |
| sort_dir     | 否    | String  | **参数解释：** 排序方向。 **约束限制：** 不涉及。 **取值范围：** - asc：升序排列。   - desc：降序排列。    **默认取值：** desc。                                                                                                                                                                                                                           |
| session_id   | 否    | String  | **参数解释：** 会话的ID。 **约束限制：** 不涉及。 取值范围： 符合正则：\^\[a-zA-Z0-9_-\]+$, 长度1\~128。 **默认取值：** 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| status       | 否    | String  | **参数解释：** 会话状态。 **约束限制：** 不涉及。 **取值范围：** - RUNNING：运行中。   - TERMINATING：终止中。   - TERMINATED：已终止。    **默认取值：** 不涉及。 |
| session_name | 否    | String  | **参数解释：** 会话名称。 **约束限制：** 不涉及。 **取值范围：** 符合正则条件 \^\[a-zA-Z0-9_-\]+$，即仅允许字母、数字、中划线、下划线组成，字符长度 1-128。 **默认取值：** 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
   
#### 请求参数
无
#### 响应参数
**状态码：200**
表3响应Body参数 
| 参数          | 参数类型                                                                                     | 描述                                                                                                                                                                |
|:---|:---|:---|
| total_count | Integer                                                                                  | **参数解释：** 总记录数。 **取值范围：** 0到20。  |
| items       | Array of [ToolSessionBasic] objects | **参数解释：** 查询列表数组。 **取值范围：** 不涉及。 |
   
 表4ToolSessionBasic 
| 参数           | 参数类型   | 描述                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
|:---|:---|:---|
| session_id   | String | **参数解释：** 会话的ID。 **取值范围：** 符合正则：\^\[a-zA-Z0-9_-\]+$, 长度1\~128。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
| session_name | String | **参数解释：** 会话名称。 **取值范围：** 符合正则条件 \^\[a-zA-Z0-9_-\]+$，即仅允许字母、数字、中划线、下划线组成，字符长度 1-128。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| status       | String | **参数解释：** 会话状态。 **取值范围：** - RUNNING：运行中。   - TERMINATING：终止中。   - TERMINATED：已终止。    |
| created_at   | String | **参数解释：** 创建时间。 **取值范围：** 不涉及。                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 |
   
**状态码：400**
表5响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code | String | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg  | String | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
   
**状态码：401**
表6响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code | String | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg  | String | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
   
**状态码：403**
表7响应Body参数 
| 参数                            | 参数类型                                                                                             | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code                    | String                                                                                           | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg                     | String                                                                                           | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
| encoded_authorization_message | String                                                                                           | **参数解释：** 编码后的授权失败信息。 **取值范围：** 长度1到4096个字符。                                                                                           |
| details                       | Array of [CoreToolsCommonError] objects | **参数解释：** 依赖的下游服务错误信息列表。 **取值范围：** 数组长度0到10个元素。                                                                                        |
   
 表8CoreToolsCommonError 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code | String | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg  | String | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
   
**状态码：404**
表9响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code | String | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg  | String | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
   
**状态码：409**
表10响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code | String | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg  | String | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
   
**状态码：429**
表11响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code | String | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg  | String | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
   
**状态码：500**
表12响应Body参数 
| 参数         | 参数类型   | 描述                                                                                                                                                                                                                                                                      |
|:---|:---|:---|
| error_code | String | **参数解释：** 错误码。 **取值范围：** 满足正则\^AgentArts.0400\\d{4}$，例如AgentArts.04000404。                                                             |
| error_msg  | String | **参数解释：** 错误信息。 **取值范围：** 符合正则：\^\[a-zA-Z0-9\\s\\u4e00-\\u9fff.,!?;:()'"-\\u3002\\uff0c\\uff01\\uff1f\\uff1b\\uff1a\\uff08\\uff09\]+$。 |
   
#### 请求示例
无
#### 响应示例
**状态码：200**
OK。
```
{
  "items" : [ {
    "session_id" : "386ab51c-aaa0-4e7b-8c3f-60243a1e22fa",
    "session_name" : "asfasfasf",
    "status" : "RUNNING",
    "created_at" : "2026-03-14T11:08:50.244+00:00"
  } ],
  "total_count" : 1
}
```
**状态码：400**
请求参数错误。
```
{
  "error_code" : "AgentArts.04000400",
  "error_msg" : "Invalid parameter."
}
```
**状态码：401**
认证失败。
```
{
  "error_code" : "AgentArts.04000401",
  "error_msg" : "Authentication failed: invalid token."
}
```
**状态码：403**
权限不足。
```
{
  "error_code" : "AgentArts.04000403",
  "error_msg" : "Authentication failed: you have no permission of XXX",
  "encoded_authorization_message" : "eyJlcnJvciI6ICJVbmF1dGhvcml6ZWQifQ==",
  "details" : [ {
    "error_code" : "AgentArts.04000403",
    "error_msg" : "Authentication failed."
  } ]
}
```
**状态码：404**
资源不存在。
```
{
  "error_code" : "AgentArts.04000404",
  "error_msg" : "resource xxx not exist"
}
```
**状态码：409**
操作冲突。
```
{
  "error_code" : "AgentArts.04000409",
  "error_msg" : "operation conflict"
}
```
**状态码：429**
请求频率超限。
```
{
  "error_code" : "AgentArts.04000429",
  "error_msg" : "The interface has been limited."
}
```
**状态码：500**
内部系统错误。
```
{
  "error_code" : "AgentArts.04000500",
  "error_msg" : "Internal error"
}
```
#### 状态码
| 状态码 | 描述      |
|:---|:---|
| 200 | OK。     |
| 400 | 请求参数错误。 |
| 401 | 认证失败。   |
| 403 | 权限不足。   |
| 404 | 资源不存在。  |
| 409 | 操作冲突。   |
| 429 | 请求频率超限。 |
| 500 | 内部系统错误。 |
   
#### 错误码
请参见[错误码](https://support.huaweicloud.com/api-agentarts/ErrorCode.html)。
