Renders a draft work shape's stage prose the way the runtime will.
Returns one entry per submitted stage: a PROCESS stage's instruction with every declared `{{name}}` expanded and the whole `user_query` its agent receives (the instruction plus the item payload the dispatcher appends), an ASK stage's fully composed question (framing, the numbered item list labelled through `labelPath`, and the reply trailer), and any reference that expands to nothing. Rendered with the automation's own items when `triggerId` names one that has any, and with stand-ins otherwise. Read-only: it composes strings. Nothing is saved, no batch is opened and no run is dispatched. The draft is deliberately not validated, because a shape mid-edit usually is not valid and that is exactly when the preview is worth having. See `docs/design/item-ledger.md §8.2`.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The tenant identifier
The automation being edited, when there is one. Only used to find real sample items — a preview against this trigger's own backlog beats a made-up one, and the create flow has no trigger to name. Never written to.
uuidThe shape as currently authored, in the same wire form a save would take. Deliberately not run through Fruxon.Model.ItemLedgers.WorkShapeValidator: a draft mid-edit is usually invalid, and a preview that 400s exactly when the operator most needs it is not a preview.
Response Body
curl -X POST "https://api.fruxon.com/v1/tenants/string/triggers:previewWorkShape" \ -H "Content-Type: application/json" \ -d '{}'{
"stages": [
{
"index": 0,
"stageId": "string",
"kind": "PROCESS",
"instruction": "string",
"userQuery": "string",
"question": "string",
"placeholders": [],
"sampleSource": "LEDGER",
"sampleCount": 0,
"resultContract": "string",
"resultContractEnforcement": "SCHEMA",
"resultContractWarning": "string"
}
]
}{
"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
}Dry-runs the supplied trigger bindings + sample payload through the same resolver the dispatcher uses at fire time
Returns one entry per submitted binding. On success the entry carries the resolved `parameters` dict the agent executor would receive; on failure the entry carries an `error` message (unknown parameter name, type-coercion mismatch, agent with no deployed revision).
Lists recent source events for a saved trigger.
Reads the persisted trigger's integration, config, event type, and filter, then returns the same response shape as the draft-mode preview. Powers per-row Dry-run and Fire-once, where the frontend hands the per-sample payload to the existing `:preview` and `:fire` endpoints.