快速开始API 参考MCP 集成OpenClaw Skill变更日志

任务

任务(Task)属于项目。状态机:TODO → IN_PROGRESS → REVIEW → DONE,可旁路到 BLOCKED

数据模型

interface Task {
  id: string;
  projectId: string;
  title: string;
  description: string | null;
  status: "TODO" | "IN_PROGRESS" | "BLOCKED" | "REVIEW" | "DONE";
  priority: number;            // 1-5,1 = 最高
  assigneeId: string | null;
  reporterId: string | null;
  startDate: string | null;
  dueDate: string | null;
  createdAt: string;
  updatedAt: string;
}

Endpoints

列出任务

GET /openapi/v1/resource/task/list?projectId=...&status=...

status 是可选过滤;省略时返回所有状态。

创建任务

POST /openapi/v1/resource/task/create

Body:

{
  "projectId": "cms5brzya0009zp13m0hmf79x",
  "title": "实现登录页 OAuth",
  "description": "接入 GitHub OAuth",
  "priority": 2,
  "assigneeId": "cms5brzxv0001zp1393jjtqoe",
  "dueDate": "2026-09-15T00:00:00.000Z"
}

更新任务状态

PATCH /openapi/v1/resource/task/update

Body:

{
  "taskId": "cms...",
  "status": "IN_PROGRESS"
}

合法的状态转移:

TODOIN_PROGRESS / BLOCKED / DONE(跳过 review)
IN_PROGRESSREVIEW / BLOCKED / TODO(退回)
REVIEWDONE / IN_PROGRESS(退回)
BLOCKEDTODO / IN_PROGRESS
DONEIN_PROGRESS(reopen)

非法转移返回 400 INVALID_TRANSITION

Scope

下一步