FruxonDocs
Agent NetworkTriggers

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.

POST
/v1/tenants/{tenant}/triggers/{trigger}/ledger/items/{item}:setData
AuthorizationBearer <token>

JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.

In: header

Path Parameters

trigger*string

The trigger identifier.

Formatuuid
item*string

The ledger item identifier.

Formatuuid
tenant*string

The tenant identifier

The paths and values, the required reason, and whether to re-drive.

set*

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.

reason*string

Why — required, recorded on the transition before the old and new values.

Length1 <= length <= 4000
redrive?boolean

Also 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.

[key: string]?never

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
}
Empty
Empty
{
  "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
}