跳到主要内容

任务详情

GET/research/worker/tasks/{id}在线调试
GET https://api.shengkezhi.com/open/v1/research/worker/tasks/{id}
等效 curl
curl "https://api.shengkezhi.com/open/v1/research/worker/tasks/{id}" \
  -H "Authorization: Bearer sk_xxx"

GET /research/worker/tasks/{id} — 任务详情。

需在请求头携带 Authorization: Bearer sk_xxx

路径参数

参数必填说明
id执行 ID

响应

响应 dataTaskInfo

字段类型必填说明
errorstring|null失败时的错误信息;成功或尚未失败时为空。
idstring任务编号,后端自增生成(形如 task-3),用于查询任务进度。
kindstring任务类型标识,如 workspace 初始化对应 workspace_init
statusTaskStatus任务当前状态(queuedrunningsucceededfailed)。
user_idstring任务归属用户,取自网关注入的 X-Skz-User-Id;任务列表按此隔离。

调用示例

curl "https://api.shengkezhi.com/open/v1/research/worker/tasks/task-3" -H "Authorization: Bearer sk_xxx"
{
"code": 0,
"msg": "ok",
"data": {
"id": "task-3",
"user_id": "01JZ8QK4M7N2P5R9T3V6X0Y1B4",
"kind": "echo",
"status": "running",
"error": null
}
}