FruxonDocs
Agent NetworkTriggers

Lists or counts what a draft work shape's source returns right now, admitting nothing.

Runs the door's list tool once against the named account and returns the first page, annotated per record with the identity admission would de-duplicate on, the value that would move the watermark, what a person would be asked about it, and whether the ledger already holds it. Also returns the exact arguments the tool was called with — for a Gmail door that is the operator's query with the day-granular `after:` term folded in, which is the single most surprising thing about a source. A capped page comes back with `truncated` and `moreAvailable` set, plus the source's own `nextPageToken` when it advertised one — because "50 records, truncated" used to be the end of the conversation, and the answer to "how many are waiting" was therefore "more than 50". Pass `countOnly` for that answer: the same door paged to exhaustion under the same watermark and bound rules, returning `count` — the total, how many the ledger already holds, how many clear the bound, the pages fetched, and which server ceiling stopped the scan (2,000 records / 20 pages) so a floor is never read as a total. No records come back, and `limit` is ignored. Unbounded by default: a caught-up automation returns nothing under its own watermark, and reading that as a broken query is the confusion this exists to end. Pass `applyWatermark` to see what the next scheduled pass would list instead. Read-only in both modes. Nothing is admitted, no cursor moves, and a ledger that does not exist yet is not created. Rate-limited because it drives a live list tool on a button press, and a count drives it repeatedly.`. The list tool runs in an Application — the named trigger's, or the tenant's Default one when none is named — and an account-less door lists that Application's own data, so the caller needs Editor there. A named trigger the caller cannot reach is a 404, worded exactly as one that does not exist.

POST
/v1/tenants/{tenant}/triggers:testWorkShapeSource
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. Supplies the shape when TestWorkShapeSourceRequest.WorkShape is omitted (the read-only Overview button), the network the tool runs in, and the ledger every listed record is checked against so the operator can see which of them are already here. Never written to.

Because the list tool runs in that Application, naming a trigger takes Editor there — the role editing the automation itself takes — and one the caller cannot reach is a 404, worded exactly as one that does not exist. With no trigger named the tool runs in the tenant's Default Application instead, and the caller needs Editor in that one.

Formatuuid
workShape?

The shape as currently authored, in the same wire form a save would take — the door is expanded server-side by ItemLedgers.WorkShapeNormalizer, so what is listed is what the runtime would list. Omitted in the read-only flow, where TestWorkShapeSourceRequest.TriggerId names a saved shape instead.

applyWatermark?boolean

Whether to fold the ledger's current watermark into the listing, i.e. list what the next pass would see rather than what the query matches at all.

Default false, and deliberately so. A caught-up automation returns nothing with the bound applied, and an operator testing a query they just changed would read that emptiness as "my query is wrong" — which is the exact confusion this endpoint exists to end. Unbounded answers "does this match anything", and each record is separately annotated with whether the bound would have admitted it.

limit?integer|null

How many records to return. Bounded because this drives a live list tool against someone's mailbox on a button press, and because the answer to "is this source wired up" is legible in the first handful. Ignored when TestWorkShapeSourceRequest.CountOnly is set — a count has no page to size.

Formatint32
countOnly?boolean

Counts the source backlog without admitting records or moving a cursor. Uses the same watermark and bounds as source listing. Server record and page limits bound the scan; the response marks when a limit was reached, so partial counts are lower bounds.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/triggers:testWorkShapeSource" \  -H "Content-Type: application/json" \  -d '{}'
{
  "doorId": "string",
  "listToolId": "string",
  "integrationConfigId": "string",
  "parameters": {},
  "nextPassParameters": {},
  "watermarkApplied": false,
  "pageOrder": "SOURCE_ORDER",
  "skipWhenApplied": false,
  "bound": "string",
  "cursorValue": "string",
  "startFrom": 0,
  "boundFromStartFrom": false,
  "projection": [
    "string"
  ],
  "records": [
    {
      "index": 0,
      "itemKey": "string",
      "cursorValue": "string",
      "label": "string",
      "state": "UNKNOWN",
      "stageId": "string",
      "status": "READY",
      "withinBound": false,
      "record": null
    }
  ],
  "truncated": false,
  "moreAvailable": false,
  "nextPageToken": "string",
  "count": {
    "total": 0,
    "filtered": 0,
    "alreadyHeld": 0,
    "withinBound": 0,
    "pages": 0,
    "truncatedAt": "NONE"
  }
}
{
  "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
}
{
  "type": "string",
  "title": "string",
  "status": 0,
  "detail": "string",
  "instance": "string",
  "property1": null,
  "property2": null
}