API 参考 / changes

ChangeSet 增量列表

GET /api/v1/changes · listChanges

按当前项目 RLS 读取 seq > sinceSeq 的 ChangeSet/Event 增量,客户端用 nextSeq 继续拉取。

结果集按调用者 moduleAccess 逐行过滤(B-00216)。 进得来不等于看得全:条目按其对象所属 模块判定归属,调用者对该模块等级为 none 的条目不下发;判不出归属的对象条目一律不下发。 因为过滤发生在取数之后,实际返回条数可能少于 limit——分页请以 nextSeq / nextCursor 为准, 不要用「不足 limit」判定已到末页。归属表见 docs/api/guides/activity.md。

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

参数

sinceSeq
integer
limit
integer

响应字段 · 200

items(必填)
ChangeSet[]
items[].id(必填)
string
items[].seq(必填)
integer
items[].actorId(必填)
string
items[].kind(必填)
string
items[].summary(必填)
string
items[].createdAt(必填)
string
items[].events(必填)
DomainEvent[]
items[].events[].id(必填)
string
items[].events[].changeSetId(必填)
string
items[].events[].type(必填)
string
items[].events[].payload(必填)
object
items[].events[].occurredAt(必填)
string
nextSeq(必填)
integer

错误

请求示例(curl)

curl -X GET "https://你的项目.workflow.games/api/v1/changes?sinceSeq=…&limit=…" \
  -H "Authorization: Bearer wfp_…"

响应示例

HTTP/1.1 200
{
  "items": [
    {
      "id": "018f3c2e-0000-7000-8000-000000000000",
      "seq": 1,
      "actorId": "018f3c2e-0000-7000-8000-000000000000",
      "kind": "示例文本",
      "summary": "一段描述文字",
      "createdAt": "示例文本",
      "events": [
        {}
      ]
    }
  ],
  "nextSeq": 1
}

合同真值:OpenAPI 3.1(0.1.0)。

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

Workflow 正在加载…