接口描述
分页查询会话列表,支持按 Agent / 状态 / 时间范围过滤。
GET /v2/enterprises/{enterpriseId}/managedagent/sessions输入参数
路径参数
参数 | 类型 | 说明 |
enterpriseId | string | WorkBuddy 企业 ID |
查询参数
参数 | 类型 | 说明 |
page | integer | 页码,从 1 开始,缺省 1 |
pageSize | integer | 每页条数,缺省 20,上限 100 |
sessionId | string | 按会话 ID 过滤 |
status | string | 按状态过滤 |
agentId | string | 按 Agent 业务 ID 过滤 |
userId | string | 按用户 ID 过滤 |
startTime | string | 创建时间下界(RFC3339,闭区间) |
endTime | string | 创建时间上界(RFC3339,闭区间) |
请求体
无(GET / DELETE 不带请求体,条件走路径与查询参数)
输出参数
(
200,业务出参包装在 code / data / msg / requestId 中)DescribeAgentSessionListResponse 对应 /DescribeAgentSessionList 响应体。
字段 | 类型 | 说明 |
totalCount | integer | TotalCount 符合条件的会话总数(过滤后、分页前)。 |
sessionSet | SessionSet 当前页的会话列表。 |
示例
输入示例
GET /v2/enterprises/{enterpriseId}/managedagent/sessions?page=1&pageSize=20Authorization: Bearer pt_<YOUR_APP_KEY>
输出示例
{"code": 0,"data": {"sessionSet": [{"agentId": "736918300000000001","agentName": "数据分析助手","createdTime": "2026-10-20T09:30:00Z","creator": "<REDACTED_USER>","modifiedTime": "2026-10-20T09:30:00Z","sessionId": "736918300000000002","sessionName": "数据分析助手","source": "string","status": "CREATING","versionId": "2087791755109965825","versionName": "prod"}],"totalCount": 1},"msg": "OK","requestId": "3c6d138e-1234-5678-9abc-def012345678"}
错误码
说明:
错误码 | 说明 |
FailedOperation.WMASessionPrecheckBlocked | 因欠费服务已停用,请结清账单后重试 |
InternalError.SessionOperationFailed | 会话操作失败 |
InvalidParameter.InvalidRequestBody | 请求体不合法 |
InvalidParameterCombination.TimeFilterPairRequired | StartTime 与 EndTime 必须成对传入 |
InvalidParameterValue.InvalidTimeFilter | StartTime / EndTime 必须是 RFC3339 格式字符串 |
MissingParameter.UinRequired | 公共参数中缺少 Uin |
UnauthorizedOperation.UnprovisionedTenant | 租户未开通,或企业不存在 |