API 参考 / schedule

更新里程碑

PUT /api/v1/schedule/milestones/{milestoneId} · updateMilestone

更新里程碑字段(含 description 说明)。需要 manage_schedule。写命令在 TenantTx 内产 ChangeSet + milestone.updated Event。projectId 由子域租户上下文注入,不在 path。

鉴权:项目 API Token(Authorization: Bearer wfp_…)。详见 Agent 接入。

参数

milestoneId(必填)
string

请求体

title
string
description
string —— 里程碑说明(可选)。非空即覆盖;要清空说明请用 clearDescription(空串本身不改动,与其它可选字段同一 non-empty-guard 口径)。
clearDescription
boolean —— 置 true 时清空说明(description 与它并存时以本字段优先清空)。
kind
enum;取值:review / integration / freeze / release / custom
requirementIds
string[]
releaseWindowId
string
clearReleaseWindow
boolean —— 置 true 时解除目标版本绑定(releaseWindowId 与它并存时以本字段优先解绑)。
targetOn
string
status
enum;取值:planned / at_risk / done
reason
string

响应字段 · 200

id(必填)
string
displayKey(必填)
string
title(必填)
string
description
string —— 里程碑说明(可选,纯文本)。空串表示无说明。
kind(必填)
enum;取值:review / integration / freeze / release / custom
requirementIds(必填)
string[] —— 关联需求 id 列表(多对多,可为空表示项目级节点)。
releaseWindowId
string
targetOn(必填)
string
status(必填)
enum;取值:planned / at_risk / done
createdAt(必填)
string
updatedAt(必填)
string

错误

请求示例(curl)

curl -X PUT "https://你的项目.workflow.games/api/v1/schedule/milestones/{milestoneId}" \
  -H "Authorization: Bearer wfp_…" \
  -H "content-type: application/json" \
  --data '{"title":"示例标题","description":"一段描述文字","clearDescription":true}'

响应示例

HTTP/1.1 200
{
  "id": "018f3c2e-0000-7000-8000-000000000000",
  "displayKey": "示例文本",
  "title": "示例标题",
  "kind": "review",
  "requirementIds": [
    "018f3c2e-0000-7000-8000-000000000000"
  ],
  "targetOn": "2026-08-01",
  "status": "planned",
  "createdAt": "示例文本",
  "updatedAt": "2026-08-01"
}

合同真值:OpenAPI 3.1(0.1.0)。

相关:Agent 接入指南 · 使用指南 · API 参考索引

Workflow 正在加载…