FruxonDocs
Agent NetworkTriggers

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

POST
/v1/tenants/{tenant}/triggers:previewWorkShape
AuthorizationBearer <token>

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

In: header

Path Parameters

tenant*string

The tenant identifier

triggerId?string|null

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.

Formatuuid
workShape?

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

[key: string]?never

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
}