Lists recent source events for an unsaved trigger draft.
Returns the last N items the source mailbox or workspace would have matched, annotated with whether the draft filter would have fired on each. This backs the create-flow panel before a trigger row exists. It is read-only — no upstream writes, no trigger persistence, no agent enqueue. The capability is per-`(integration, eventType)`; pairs without a registered `IRecentEventSource` return 400.`.
Authorization
Bearer JWT Authorization header using the Bearer scheme. Enter 'Bearer' [space] and then your token.
In: header
Path Parameters
The tenant identifier
uuidDraft content filter to dry-run against each returned sample. When
supplied, the response's per-sample WouldFire reports whether
the live trigger would have fired on that payload at dispatch time.
Null filter means "fire always" — every WouldFire is true.
How many recent items to fetch (capped server-side).
int32Optional per-source narrowing hints. Gmail / Outlook ignore this. Slack
reads scope["channel_id"] to target one channel; when omitted the
Slack source aggregates the bot's accessible channels.
Response Body
curl -X POST "https://api.fruxon.com/v1/tenants/string/triggers:testRecentEvents" \ -H "Content-Type: application/json" \ -d '{ "integrationId": "string", "integrationConfigId": "928c9032-93b2-49a3-82db-be1a31402d0e", "eventType": "string" }'{
"samples": [
{
"upstreamId": "string",
"occurredAtMs": 0,
"label": "string",
"payload": {
"source": "UNSPECIFIED",
"eventType": "string",
"body": {}
},
"wouldFire": false
}
]
}{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"property1": null,
"property2": null
}Tests one stage of the automation on one input.
Queues a sandbox run of the stage's agent, on its deployed revision, with exactly the request a pass would send, and returns at once; poll the test until it finishes. The input is a real item (only read), a record the source returned, typed data, the step before in a walk, or a run a pass dispatched (`executionRecordId`): a replay of that run, at its stage unless `stageIndex` names another, on exactly the data it was handed. Each connection reads for real and writes to the simulator unless routed to the simulator entirely; a live connection is not offered. The run is charged to the agent's test budget. To test a revision before deploying it, name it with `agentRevision`, or per agent with `agentRevisions` for a walk; to test an edit before it is even a revision, name the caller's draft with `agentDraft`. The test then runs that revision or draft, holds it to every check the deployed one would face, and reports `agentRevisionDeployed: false`. Returns 400 when the stage cannot be tested yet — not a PROCESS stage, a batch stage, an undeployed agent, or an agent holding a tool that would reach a real person — or the run to replay is not one of this automation's; 404 when a named revision or run does not exist; and 409 when the draft has moved past the version named, or the caller already has the most tests running at once.
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.