UmweltDocs
Reference/Queries/changes
changesquerysince 0.1

An append-only feed of what was written, to react to new commits.

Request
umwelt call story.umw changes '{
  "projectId": "ball",
  "sinceSeq": 0,
  "limit": 1
}'
Request
const result = await client.changes({ projectId: 'ball', sinceSeq: 0, limit: 1 });
Request
var result = engine.Changes(new ChangesPayload { ProjectId = "ball", SinceSeq = 0, Limit = 1 });
Response
{
  "items": [
    {
      "timelineId": "main",
      "version": 1,
      "payload": {
        "eventId": "arrivals",
        "version": 1,
        "recordCount": 5,
        "transitionCount": 0
      },
      "seq": 1,
      "type": "commit"
    }
  ],
  "nextCursor": "31"
}

Payload

FieldTypeDescription
projectIdrequiredstringThe project to read.
sinceSeqintegerdefault 0Return items after this sequence number. 0 for everything.
limitintegerdefault 100How many items to return.
timelineIdstringdefault "main"Only this timeline’s items. Absent: every timeline.

Result

FieldTypeDescription
itemsalwaysChangeItem[]Changes in commit order, each with its seq, type, timelineId, version and payload.
nextCursorstringMore changes follow.

Rules

One feed for every timeline. Sequence numbers are global. A promote appends a timeline.promoted item to the parent’s feed, so a client following main learns that a draft’s changes now belong to it.

Gaps are normal. A purge removes a draft’s items and leaves gaps in the sequence.

Errors

VALIDATION_FAILEDThe payload is malformed.
NOT_FOUNDThe project or timeline does not exist, or the draft read was purged.
HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.

Every code is listed in Errors.

See also

Was this page helpful?