帮你快速理解、总结文档立即下载

列出会话物料

最近更新时间:2026-10-29 18:19:31
我的收藏

接口描述

分页查询会话物料列表,支持按物料 ID 批量反查。
GET /v2/enterprises/{enterpriseId}/managedagent/sessions/{sessionId}/artifacts

输入参数

路径参数

参数
类型
说明
enterpriseId
string
WorkBuddy 企业 ID
sessionId
string
等价于请求体字段 SessionId

查询参数

参数
类型
说明
page
integer
页码,从 1 开始,缺省 1
pageSize
integer
每页条数,缺省 20,上限 100
ArtifactId
string
过滤参数(云 API 字段 ArtifactId)
Keyword
string
过滤参数(云 API 字段 Keyword),模糊匹配
StartTime
string
过滤参数(云 API 字段 StartTime)
EndTime
string
过滤参数(云 API 字段 EndTime)

请求体

无(GET / DELETE 不带请求体,条件走路径与查询参数)

输出参数

(200,业务出参包装在 code / data / msg / requestId 中)
DescribeSessionArtifactListResponse 对应 Action=DescribeSessionArtifactList 响应体。
字段
类型
说明
totalCount
integer
TotalCount 符合条件的物料总数,按 ID 批量查询时即命中数。
artifactSet
ArtifactSet 物料列表,无数据时为 [] 而非 null。

示例

输入示例

GET /v2/enterprises/{enterpriseId}/managedagent/sessions/{sessionId}/artifacts?page=1&pageSize=20
Authorization: Bearer pt_<YOUR_APP_KEY>

输出示例

{
"code": 0,
"data": {
"artifactSet": [
{
"agentId": "736918300000000001",
"artifactId": "1200345678901234567",
"createdTime": "2026-10-20T09:30:00Z",
"expiredTime": "2026-10-20T09:30:00Z",
"fileName": "report-2026-10-20.xlsx",
"filePath": "/workspace/out/report-2026-10-20.xlsx",
"fileSha256": "9f2c4b1e7a3d5c8b0f1a2e3d4c5b6a7980fedcba0123456789abcdef01234567",
"fileSizeBytes": 184320,
"sessionId": "736918300000000002",
"status": "PENDING",
"uploadedTime": "2026-10-20T09:30:00Z"
}
],
"totalCount": 2
},
"msg": "OK",
"requestId": "3c6d138e-1234-5678-9abc-def012345678"
}

错误码

说明:
以下仅列出了接口业务逻辑相关的错误码,其他错误码详见错误响应与公共错误码。
错误码
说明
InternalError.SessionArtifactOperationFailed
会话物料操作失败
InvalidParameter.InvalidRequestBody
请求体不合法
InvalidParameter.Pagination
分页参数不合法
InvalidParameter.SessionIDRequired
缺少 SessionId
InvalidParameterValue.InvalidArtifactFilter
不支持的过滤字段名,或过滤取值不合法(支持 ArtifactId / Keyword / StartTime / EndTime)
LimitExceeded.ArtifactIdsCount
单次请求的 ArtifactIds 数量超限(最多 100 个)
MissingParameter.UinRequired
公共参数中缺少 Uin
ResourceNotFound.Session
会话不存在