查询资源操作详情

查询一个智能体资源操作的状态和结果。

GET https://moi.matrixorigin.cn/newmoi/workspaces/{workspace_id}/operations/{operation_id}

调用前准备

准备具有目标工作区访问权限的个人访问令牌和目标工作区 ID。

请求参数

curl "https://moi.matrixorigin.cn/newmoi/workspaces/$WORKSPACE_ID/operations/$OPERATION_ID" -H "X-API-Key: $AI_STUDIO_API_KEY" -H "X-Workspace-ID: $WORKSPACE_ID"

字段

类型

必填

说明

workspace_id

string

与 X-Workspace-ID 一致的工作区 ID。

operation_id

string

要查看的操作 ID。

成功响应

成功时返回 200 和操作详情。

{"code":0,"data":{"id":"op_01","status":"running"}}

字段

类型

说明

code

integer

成功时为 0。

字段

类型

说明

data.id

string

操作 ID。

data.operation_id

string

操作 ID。

data.type

string

操作类型。

data.resource_type

string

关联资源类型;未设置时不返回。

data.resource_id

string

关联资源 ID;未设置时不返回。

data.result

object

成功结果;未设置时不返回。

字段

类型

说明

data.status

string

accepted、running、succeeded、failed 或 canceled。

data.progress

integer

操作进度。

data.error

object

失败信息;未设置时不返回。

错误响应

{"code":5,"message":"operation not found"}

字段

类型

说明

code

integer

错误代码。

message

string

面向调用者的错误信息。

最后更新于