groupCoveragequerysince 0.1
Who in a group holds a claim, who holds nothing about it, and whether the group itself does.
Request
umwelt call story.umw groupCoverage '{
"projectId": "ball",
"group": "household",
"claim": {
"subject": "bob",
"predicate": "stole",
"object": { "kind": "entity", "id": "necklace" },
"polarity": true
},
"at": { "tick": 6 }
}'Request
const result = await client.groupCoverage({ projectId: 'ball', group: 'household', claim: theft, at: { tick: 6 } });Request
var result = engine.GroupCoverage(new GroupCoveragePayload
{
ProjectId = "ball",
Group = "household",
Claim = theft,
At = new At { Tick = 6 },
});Response
{
"group": "household",
"holding": [
{
"holder": "maid",
"attitude": "believes",
"confidence": 0.9,
"polarity": true,
"recordId": "maid-heard"
}
],
"members": ["butler", "maid"],
"missing": ["butler"]
}Payload
| Field | Type | Description |
|---|---|---|
projectIdrequired | string | The project to read. |
grouprequired | string | The group entity. |
claim | Claim | The claim, by its parts: subject, predicate, object and polarity. Give claim or claimKey. |
claimKey | string | The claim by its stable key. See Claim keys. |
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 |
|---|---|---|
groupalways | string | The group. |
membersalways | string[] | Its members at the position. |
holdingalways | WhoHoldsItem[] | Members who hold the claim, with their Holdings. |
missingalways | string[] | Members who hold nothing about it. |
groupHolding | WhoHoldsItem | The group’s own Holding, if the group itself holds the claim. |
Rules
Members knowing is not the group knowing. groupHolding is the group’s own record. It is absent even when every member holds the claim.
Membership is read at the position. Members are those with an active umwelt:member-of Fact at at.
Errors
VALIDATION_FAILEDThe payload is malformed, or gives neither claim nor claimKey.NOT_FOUNDThe project, group 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?