mosoodocs

列出 Agent API Endpoint 的 Thread

返回由已认证 API token 调用方创建的 Thread。

GET/agents/{agentId}/threads

返回由已认证 API token 调用方创建的 Thread。

Authorization

publicApiBearer
AuthorizationBearer <token>

使用 Authorization: Bearer msp_...。Project API key 只能配置、执行和访问本 Project 的 Agent、Session 和文件。密钥和账号管理需要 console 或 CLI 登录。旧账号 token 已被拒绝。

In: header

Path Parameters

agentId*string

来自 Agent API Access 面板的 Agent API Endpoint ID。v1 ID 是不带前缀的 ULID。

Match^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$
Formatulid

Query Parameters

archived?boolean

按归档状态筛选:true 仅返回已归档 Thread,false 仅返回活动 Thread。省略时返回全部 Thread。

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/agents/01J00000000000000000000001/threads"
{  "threads": [    {      "agent_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",      "created_at": "2019-08-24T14:15:22Z",      "id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",      "kind": "pet",      "last_run_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV",      "source": "api",      "status": "IDLE",      "title": "string",      "updated_at": "2019-08-24T14:15:22Z",      "userId": "string"    }  ]}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}
{  "error": {    "code": "agent_not_published",    "message": "string"  }}