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

风险

风险(Risk)是项目维度的 issue tracker。比 Action Item 重,比 Task 轻。

数据模型

interface Risk {
  id: string;
  projectId: string;
  title: string;
  description: string | null;
  severity: "LOW" | "MEDIUM" | "HIGH" | "CRITICAL";
  status: "OPEN" | "MITIGATING" | "RESOLVED";
  ownerId: string | null;
  createdAt: string;
  updatedAt: string;
}

Endpoints

列出风险

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

projectId 是可选过滤;省略时返回工作区所有风险。status 是可选过滤。

创建风险

POST /openapi/v1/resource/risk/create

Body:

{
  "projectId": "cms5brzya0009zp13m0hmf79x",
  "title": "上线后没观察 metrics",
  "description": "上线 2 小时后才发现 latency 飙升",
  "severity": "HIGH",
  "ownerId": "cms5brzxe0000zp13yno59cbq"
}

更新风险

PATCH /openapi/v1/resource/risk/update

Body:

{
  "riskId": "cms...",
  "status": "MITIGATING"
}

合法的状态转移:

OPENMITIGATING / RESOLVED
MITIGATINGRESOLVED / OPEN(退回)
RESOLVED终态;可以重新打开为 OPEN

Scope

下一步