FruxonDocs
ApiKnowledge bases

Runs one bounded pass of a source's implementation now.

Scans and processes within ceilings rather than draining the source: a request that names none gets a small default, because the first sync an operator presses is usually against a source that has never run, and finding out whether it works should not cost a whole backlog. Draining is what resuming the schedule does. A paused source syncs — a pause withholds the automatic pass, not the operator's own — and the pass is the automation's own, so it takes the same lock, admits idempotently, and is recorded in the same fire log with its cost. The response echoes the ceilings, because a capped pass and a caught-up source otherwise report the same zeroes. A pass that names stages claims only there, and lifts any hold those stages are under because their runs were being refused — the way to resume a stage after raising its agent's budget. A pass with `closeGathering` closes every group gathering at a batch stage now — "merge what has arrived" — rather than waiting for it to fill or for its window.

POST
/v1/tenants/{tenant}/knowledgeBases/{knowledgeBase}/sources/{source}:sync
AuthorizationBearer <token>

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

In: header

Path Parameters

knowledgeBase*string

The knowledge base id.

Formatuuid
source*string

The knowledge source id.

Formatuuid
tenant*string

The tenant identifier

Optional per-pass ceilings, the stages to claim at, and whether to close gathering groups.

maxAdmit?integer|null

Stop admitting after this many genuinely-new items.

Formatint32
maxDispatch?integer|null

Stop claiming after this many items across every stage of the pass.

Formatint32
stageIds?|null

Claim only at these stages of the source's automation, by their declared ids; a stage it does not declare is rejected with 400. Omitted or empty claims at every stage, in declared order.

Naming a stage also lifts its hold — the one a refused run puts on a stage, for instance when the merging agent is over its daily budget. A managed source's automation refuses a direct fire, so this is the one pass its operator can use to say "the budget is raised, run it now".

closeGathering?boolean

Close every gathering group at the source automation's batch stages now — "merge what has arrived" — instead of waiting for each to fill or for its oldest candidate to wait out the window. A group still runs one batch at a time. The one way to ask a managed source for it, since its automation refuses a direct fire.

cohort?

Open a cohort with this sync — "Backfill", optionally sampled — or add it to the one open. Every later sync and scheduled pass joins it until one lists the source to its end.

[key: string]?never

Response Body

curl -X POST "https://api.fruxon.com/v1/tenants/string/knowledgeBases/497f6eca-6276-4993-bfeb-53cbbbba6f08/sources/497f6eca-6276-4993-bfeb-53cbbbba6f08:sync" \  -H "Content-Type: application/json" \  -d '{}'
{
  "sourceId": "00000000-0000-0000-0000-000000000000",
  "triggerId": "00000000-0000-0000-0000-000000000000",
  "admitted": 0,
  "dispatched": 0,
  "alreadyRunning": false,
  "maxAdmit": 0,
  "maxDispatch": 0,
  "stageIds": [
    "string"
  ],
  "closeGathering": false,
  "cohortId": "00000000-0000-0000-0000-000000000000"
}
{
  "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
}