UmweltDocs
Reference/Queries/record
recordquerysince 0.1

One record by its id: a Fact, a Holding, an Awareness or a Disposition.

Request
umwelt call story.umw record '{
  "projectId": "ball",
  "recordId": "theft"
}'
Request
const result = await client.record({ projectId: 'ball', recordId: 'theft' });
Request
var result = engine.Record(new RecordId { ProjectId = "ball", RecordIdValue = "theft" });
Response
{
  "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

FieldTypeDescription
projectIdrequiredstringThe project to read.
recordIdrequiredstringThe record.
timelineIdstringdefault "main"The timeline to read.

Result

FieldTypeDescription
kindalways"fact" | "holding" | "awareness" | "disposition"What it is. The other fields follow from it.
idalwaysstringThe record’s id.
eventIdalwaysstringThe event it was written in.
positionalwaysPositionWhere it stands in the story.
recordedAtalwaysintegerThe version that wrote it.
claimClaimWhat a Fact or a Holding says.
holderstringWhose Holding, Awareness or Disposition it is.
attitude, confidence, accessibility, acquisition…How a Holding is held, and how it was acquired.
target, dimension, value…What an Awareness or a Disposition is about, and a Disposition’s value.
provenancealwaysProvenanceWho or what wrote it.

Rules

No position. The record is returned as written, whatever its status. trace adds its transitions and its chain.

Records are never edited. A record keeps what it was written with. Its status changes only through transitions.

Errors

VALIDATION_FAILEDThe payload is malformed.
NOT_FOUNDThe project, record 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?