holding.adjustBatchcommandsince 0.1
Changes the confidence, accessibility or attitude of many Holdings at once, such as a night of forgetting.
Request
umwelt call story.umw holding.adjustBatch '{
"projectId": "ball",
"attemptId": "doubt",
"position": { "tick": 6 },
"adjustments": [
{
"recordId": "butler-found",
"attitude": "suspects",
"confidence": 0.4,
"newRecordId": "butler-unsure"
}
]
}'Request
const result = await client.holdingAdjustBatch({
projectId: 'ball',
attemptId: 'doubt',
position: { tick: 6 },
adjustments: [
{
recordId: 'butler-found',
attitude: 'suspects',
confidence: 0.4,
newRecordId: 'butler-unsure',
},
],
});Request
var result = engine.HoldingAdjustBatch(new AdjustHoldingsInput
{
ProjectId = "ball",
AttemptId = "doubt",
Position = new Position { Tick = 6 },
Adjustments = new()
{
new HoldingAdjustment
{
RecordId = "butler-found",
Attitude = Attitude.Suspects,
Confidence = 0.4,
NewRecordId = "butler-unsure",
},
},
});Response
{
"eventId": "01a1cbd8-63f2-7392-ade9-ed363154d2ec",
"recordIds": ["butler-unsure"],
"transitionIds": ["01a1cbd8-63f2-7392-ade9-ed4f6d41987f"],
"version": 10,
"warnings": []
}Payload
| Field | Type | Description |
|---|---|---|
projectIdrequired | string | The project to write to. |
attemptIdrequired | string | Makes a retry safe: the same request with the same attempt id is applied once. |
positionrequired | Position | Where the generated event stands on the main axis: { "tick": n }. |
adjustmentsrequired | HoldingAdjustment[] | One per Holding: the recordId, and a new confidence, accessibility and/or attitude. newRecordId names the copy. |
on | object | Positions of the generated event on additional axes, such as { "reading": 12 }. |
provenance | Provenance | Who or what made the change: a person, a model, the system or an import. |
timelineId | stringdefault "main" | The timeline to write to. |
expectedVersion | integer | Fails the write with VERSION_CONFLICT unless the timeline’s head is still this version. |
Result
| Field | Type | Description |
|---|---|---|
eventIdalways | string | The event written, with the id given or generated. |
recordIdsalways | string[] | The records written, in order. |
transitionIdsalways | string[] | The transitions written, in order. |
versionalways | integer | The version this commit received. Reads at an earlier asOfVersion do not see it. |
warnings | Warning[] | UNKNOWN_PREDICATE (open vocabulary) or SECRET_BREACH. Warnings never block a write. |
Rules
History stays readable. Each Holding is superseded by a copy carrying the new values. A read before the batch sees the old ones.
One commit. With one engine event of type umwelt:adjust, kept out of full-text search.
Errors
VALIDATION_FAILEDA record is not an active Holding at position, is adjusted twice, or an adjustment changes nothing.NOT_FOUNDThe project, a record or the timeline does not exist.VERSION_CONFLICTexpectedVersion is no longer the head of the timeline.CONFLICTThe attemptId was already used with a different request.INVALID_STATEThe timeline is a draft that was promoted or discarded, and accepts no more writes.HANDSHAKE_REQUIREDOver the protocol, hello was not sent first.Every code is listed in Errors.
See also
Was this page helpful?