Corrects a stuck or excluded work item's data, optionally re-driving it.
For a value an earlier stage recorded wrong — an ASK answer written as `SKIP` for a reply that said otherwise — which a re-drive alone would route on again. `set` maps paths to JSON values: a top-level key the item carries (or a declared path's root), or a dotted path a stage declares in `produces` or as an ASK stage's `answeredWhenPath`. A declared path takes only values its declaration allows — its type, null only when nullable, and for a form-asked answer only what the form accepts. Anything else is 400, naming what is settable. The reason is required. The correction is recorded as an `OPERATOR_SET_DATA` transition whose detail is the reason followed by each path's old and new value (credential-named paths masked); the status does not move. A correction that changes nothing records nothing. With `redrive: true` the item is also re-driven in the same transaction, exactly as `:redrive` does. Only DEAD, FAILED or IGNORED items: 409 otherwise, and 409 when the item changed between the read and the write.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The trigger identifier.
uuidThe ledger item identifier.
uuidThe tenant identifier
The paths and values, the required reason, and whether to re-drive.
What to write, keyed by path: {"destination": "updated"}. A path is a top-level key of the item's data, or a dotted path the work shape declares — a stage's produces or an ASK stage's answeredWhenPath. Values are any JSON, null included where the declaration allows it.
Why — required, recorded on the transition before the old and new values.
1 <= length <= 4000Also re-drive the item, in the same transaction: either both happen or neither does. The transitions read in that order — the correction, then the re-drive.
Response Body
curl -X POST "https://api.fruxon.com/v1/tenants/string/triggers/497f6eca-6276-4993-bfeb-53cbbbba6f08/ledger/items/497f6eca-6276-4993-bfeb-53cbbbba6f08:setData" \ -H "Content-Type: application/json" \ -d '{ "set": { "property1": null, "property2": null }, "reason": "string" }'{
"id": "00000000-0000-0000-0000-000000000000",
"ledgerId": "00000000-0000-0000-0000-000000000000",
"itemKey": "string",
"label": "string",
"stageId": "string",
"status": "READY",
"stageAttempts": 0,
"nextAttemptAt": 0,
"lastError": "string",
"admittedAt": 0,
"terminalAt": 0,
"lastExecutionRecordId": "00000000-0000-0000-0000-000000000000",
"batchRunId": "00000000-0000-0000-0000-000000000000",
"batchId": "00000000-0000-0000-0000-000000000000",
"lastBatchId": "00000000-0000-0000-0000-000000000000",
"data": null,
"admittedVia": "API",
"admittedBy": "string",
"admittedByExecutionRecordId": "00000000-0000-0000-0000-000000000000",
"wakeAt": 0,
"waitingFor": "PERSON",
"cost": 0,
"runs": 0
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Every run one item caused, across all of its stages.
The item's combined execution record: each claim of the item as an attempt — its stage, what the ledger made of it — with the runs it caused, and the whole set as one run tree. It reaches runs the transition log never names: the one running now, one whose lease ran out before it finished, and the sub-tasks and consults a stage agent spawned. Totals are the item's own: its runs and their children, and its share of each batch run it was a member of. Run summaries only. A run's trace is read through its agent, under that agent's own access check.
One item's attempt history.
The append-only transition log: what happened to this item and why. The run tree answers a different question: why one attempt behaved as it did.