canonquerysince 0.1
The Facts visible at a position: the narrator’s read of what is true.
Request
umwelt call story.umw canon '{
"projectId": "ball",
"filter": { "predicate": "stole" }
}'Request
const result = await client.canon({ projectId: 'ball', filter: { predicate: 'stole' } });Request
var result = engine.Canon(new CanonPayload
{
ProjectId = "ball",
Filter = new CanonFilter { Predicate = "stole" },
});Response
{
"items": [
{
"kind": "fact",
"id": "theft",
"projectId": "ball",
"timelineId": "main",
"eventId": "scene-1",
"claim": {
"subject": "bob",
"predicate": "stole",
"object": { "kind": "entity", "id": "necklace" },
"polarity": true,
"qualifiers": {}
},
"position": { "tick": 1 },
"provenance": { "origin": { "kind": "human" } },
"recordedAt": 2
}
]
}Payload
| Field | Type | Description |
|---|---|---|
projectIdrequired | string | The project to read. |
at | Atdefault {} | Where to read: tick, an optional axis, and asOfVersion. Defaults to the latest. |
filter | CanonFilterdefault {} | Narrows the list: subject, predicate, and object (an entity id). |
page | Pagedefault {"limit":100} | How many items to return (limit, 1 to 1000) and where to continue (cursor, the nextCursor of the previous page). |
timelineId | stringdefault "main" | The timeline to read. |
Result
| Field | Type | Description |
|---|---|---|
itemsalways | Record[] | Active Facts, in story order. |
nextCursor | string | More Facts follow; pass it as page.cursor. |
Rules
Canon is nobody’s knowledge. A Fact listed here does not make anyone hold it. Ask holds for a holder.
Only active Facts. A Fact retracted or superseded before the position is left out; read earlier to see it.
Errors
VALIDATION_FAILEDThe payload is malformed, or the page limit is outside 1 to 1000.NOT_FOUNDThe project or timeline does not exist, or the draft read was purged.INVALID_STATEThe timeline read is a draft that was promoted. details.promotedInto names the timeline to read instead.HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.Every code is listed in Errors.
See also
Was this page helpful?