entity.atquerysince 0.1
An entity as canon names it at a position: its name, title and aliases over time.
Request
umwelt call story.umw entity.at '{
"projectId": "ball",
"entityId": "bob",
"at": { "tick": 1 }
}'Request
const result = await client.entityAt({ projectId: 'ball', entityId: 'bob', at: { tick: 1 } });Request
var result = engine.EntityAt(new EntityAtPayload
{
ProjectId = "ball",
EntityId = "bob",
At = new At { Tick = 1 },
});Response
{
"recordIds": ["bob-mask"],
"name": "Bob",
"aliases": ["the masked guest"],
"entity": {
"id": "bob",
"projectId": "ball",
"name": "Bob",
"aliases": ["the masked guest"],
"typeId": "person",
"archived": false,
"createdAt": { "tick": 0 },
"fields": {}
}
}Payload
| Field | Type | Description |
|---|---|---|
projectIdrequired | string | The project to read. |
entityIdrequired | string | The entity, by its engine id. |
at | Atdefault {} | Where to read: tick, an optional axis, and asOfVersion. Defaults to the latest. |
timelineId | stringdefault "main" | The timeline to read. |
Result
| Field | Type | Description |
|---|---|---|
entityalways | Entity | The entity as stored. |
namealways | string | Its name at the position: the latest active umwelt:name Fact, or the entity’s own name. |
title | string | Its title at the position, from umwelt:title. |
aliasesalways | string[] | Its aliases at the position, from umwelt:alias. |
recordIdsalways | string[] | The Facts the name, title and aliases come from. |
Rules
The latest Fact wins. A negated latest umwelt:title Fact clears the title.
This is canon. It says what the entity is called, not what anyone knows. Ask entity.asKnownBy for a holder.
Errors
VALIDATION_FAILEDThe payload is malformed.NOT_FOUNDThe project, entity 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
entity.asKnownBynames a holder knowsentity.getthe entity as storedKnowledge operationsnames over time
Was this page helpful?