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
| Field | Type | Description |
|---|---|---|
projectIdrequired | string | The project to read. |
sinceSeq | integerdefault 0 | Return items after this sequence number. 0 for everything. |
limit | integerdefault 100 | How many items to return. |
timelineId | stringdefault "main" | Only this timeline’s items. Absent: every timeline. |
Result
| Field | Type | Description |
|---|---|---|
itemsalways | ChangeItem[] | Changes in commit order, each with its seq, type, timelineId, version and payload. |
nextCursor | string | More 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?