UmweltDocs
Reference/Queries/entity.get
entity.getquerysince 0.1

One entity by its id, as stored.

Request
umwelt call story.umw entity.get '{
  "projectId": "ball",
  "entityId": "bob"
}'
Request
const result = await client.entityGet({ projectId: 'ball', entityId: 'bob' });
Request
var result = engine.EntityGet(new EntityId { ProjectId = "ball", EntityIdValue = "bob" });
Response
{
  "id": "bob",
  "projectId": "ball",
  "name": "Bob",
  "aliases": ["the masked guest"],
  "typeId": "person",
  "archived": false,
  "createdAt": { "tick": 0 },
  "fields": {}
}

Payload

FieldTypeDescription
projectIdrequiredstringThe project to read.
entityIdrequiredstringThe entity, by its engine id.

Result

FieldTypeDescription
idalwaysstringThe entity’s id, given or generated.
projectIdalwaysstringThe project it belongs to.
typeIdalwaysstringIts entity type, which decides whether it can hold knowledge.
namealwaysstringIts name.
aliasesstring[]Other names it goes by.
fieldsobjectValues for the fields its type declares.
externalRefExternalRefThe id another system gives it: { system, id }.
createdAtalwaysPositionThe position it exists from. Defaults to { "tick": 0 }.
archivedalwaysbooleanSet by entity.archive. It changes nothing else.

Rules

The stored entity, not a position. Its own name and aliases. For the names canon gives it at a point in the story, read entity.at.

Errors

VALIDATION_FAILEDThe payload is malformed.
NOT_FOUNDThe project or entity does not exist.
HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.

Every code is listed in Errors.

See also

Was this page helpful?