Ingestor runtime contract
An ingestor runtime is the program that reads sources: files, queues, databases, HTTP APIs, pushed HTTP requests. The platform stores, versions and governs ingestions; the runtime runs them and creates the dispatch jobs. The platform never calls the runtime: the runtime polls the platform, so it can sit behind a firewall. This page is that contract, for anyone writing or operating a runtime. For the idea see Ingestion; for the definition format see Ingestion definition format; for the runtime’s architecture see Ingestor runtime.
Contract version: 2. The platform serves the current version and the one before (version 1) and answers
426 with the supported range otherwise. Additive changes do not bump the version; a runtime that does not
send a newer field is served as before.
Authentication
Section titled “Authentication”All routes are under /api/ingestion-runtime/v1 and are mounted only when ingestion is enabled
(FC_INGESTION_ENABLED). The caller is the runtime’s service account, holding the role
platform:ingestion-runtime (permission platform:ingestion:runtime:operate). The account must be a
service account at anchor tier that belongs to no application: a person
(INGESTION_RUNTIME_SERVICE_ACCOUNT_REQUIRED), a client-tier account (INGESTION_RUNTIME_ANCHOR_REQUIRED)
or an application’s account (INGESTION_RUNTIME_APPLICATION_BOUND) is refused on every call, even with the
role. The role is platform-wide: one fleet serves every application’s ingestions.
Body limits: jobs up to 10 MiB (FC_INGESTION_JOBS_MAX_BYTES), report up to 4 MiB
(FC_INGESTION_REPORT_MAX_BYTES), the rest 1 MiB.
Routes
Section titled “Routes”| Method and path | Purpose |
|---|---|
POST /poll |
Ask for the ingestions to run. Every minute. |
POST /leases/release |
Release leases the runtime has stopped, and say goodbye. |
POST /report |
Route states, exchange counts, failures and test answers. |
POST /ingestions/{id}/jobs?runtimeId= |
Create the dispatch jobs or events for records. |
GET /ingestions/{id}/secrets/{name}?runtimeId= |
Read a secret the live definition names. |
GET, PUT /state/{ingestionId}/{key}?runtimeId= |
Small values (a watermark, a cursor). |
POST /traces |
Ship trace records. |
POST /api/ingestion-runtime/v1/poll
{ "runtimeId": "ingest-1", "contractVersion": 2, "kinds": [], "builtinKinds": ["http", "sftp", "sqs"], "url": "https://ingest.example.com", "instanceId": "7c2f0c1e-4a1b-4c0e-9a55-0a1b2c3d4e5f"}| Field | Meaning |
|---|---|
runtimeId |
^[A-Za-z0-9._:-]{1,100}$. Unique among running runtimes. It belongs to the service account whose poll first registered it (see below). |
contractVersion |
The version the runtime speaks. |
kinds |
The kinds the runtime’s extensions add (and camel-route when it reports it), each with its settings schema. At most 100. |
builtinKinds |
Built-in kinds the runtime carries. Absent means the baseline set (http, sftp, s3, sqs, rabbitmq, database-poll, api-poll). At most 50. |
url |
Informational; the platform never calls it. |
instanceId |
8 to 64 of [A-Za-z0-9-], a random UUID per process start. While another instance that polled as the same runtimeId is live, the poll is refused 409 RUNTIME_ID_IN_USE and changes nothing. Absent: no check. |
Response:
{ "asOf": "2026-11-08T10:00:00.000000Z", "leaseFor": "PT3M", "ingestions": [ { "id": "ing_...", "version": 4, "clientId": "clt_...", "clientIdentifier": "acme", "applicationCode": "ingest", "code": "orders-sftp", "name": "Orders over SFTP", "source": { "kind": "sftp" }, "split": { "kind": "csv", "header": true }, "target": { "code": "ingest:orders:order:received", "batchSize": 100 }, "keepFailedPayloads": false } ], "tests": [ { "id": "...", "expiresAt": "...", "ingestion": { } } ], "traces": [ { "ingestionId": "ing_...", "windowId": "...", "windowSecs": 60, "sampleEverySecs": 5, "hardStop": "..." } ]}ingestionsare live versions only, for active clients only (a suspended or deactivated client’s run nowhere), with the effective definition (a settings entry the source names is already in place; the runtime never seesconfig). A runtime rebuilds a route whenversiondiffers. It is given every shared ingestion of a kind it carries and the polled ones whose lease it holds.leaseForis the lease length, an ISO duration (defaultPT3M,FC_INGESTION_LEASE_SECONDS, minimum 120 s). A runtime that cannot renew a lease stops the route before the lease ends.testsare pending test-connection requests for kinds the runtime carries; answer them in the next report.tracesare the open trace windows for this runtime. AwindowIdseen for the first time starts the runtime’s own window ofwindowSecs, ending no later thanhardStop; the same id again changes nothing; a different id replaces the window.
Leases and placement
Section titled “Leases and placement”Source kinds sftp, s3, database-poll, api-poll and custom (and camel-route) are single-owner:
exactly one runtime runs each at a time, under a lease renewed by the poll and recorded with the database’s
clock, so replicas with different clocks agree. http, sqs and rabbitmq run on every runtime that carries
them. An ingestion of a kind no live runtime carries shows as “no runtime carries this kind”, which is not a
failure.
- Fair share, per kind. For each kind a runtime may hold
ceil(polled ingestions of the kind / live runtimes that carry the kind). It renews what it holds up to the share, claims unleased ones to fill it, and stops listing the surplus. A surplus lease is claimed by another runtime only after it has expired, by which time the first has stopped the route. A runtime is live while it polled within one lease and has not said goodbye. - Health-aware placement. A runtime whose route for a polled ingestion is
FAILEDorFAILING(reported withinFC_INGESTION_UNHEALTHY_COOLDOWN, default 10 minutes) hands it to another live carrier that has not failed it. If every carrier has failed it, it stays where it is, so a broken definition stays visible. - Return after a gap. A runtime returning after more than a lease (or after goodbye) has its new claims
capped per kind at the fair share counted over carriers seen within
FC_INGESTION_RECENT_WINDOW(default 10 minutes), so the first to return after an outage does not claim everything. - Unheld. A live polled ingestion with no unexpired lease for longer than a lease plus two minutes is
unheld:
runtimeNoticereads “not running: no runtime has held it since
Who owns a runtime id
Section titled “Who owns a runtime id”A runtime id belongs to the service account whose poll first registered it, and no later poll changes
that. Every route that names a runtime id (poll, release, report, state read and write, jobs, secrets
and traces) refuses it to any other account with 403 RUNTIME_ID_NOT_OWNED. The check comes right
after the runtime permission and before anything else, so a refused call reads and writes nothing: a
refused poll renews and claims nothing, and a refused release releases nothing. The message does not name
the owner. Only a poll registers an id: an id with no row (never polled, or pruned) is not refused by
the other routes. A runtime registered before ownership existed has no owner and is bound to the account
of its next poll.
Nothing frees an id but retention. The registration is removed once the runtime has been unseen for 7
days (a refused poll does not count as seen), and the id may then be registered by any account. A
goodbye does not free it. Moving a fleet to a new service account therefore needs new runtime ids, or
a week’s wait. Rotating the secret of the same account changes nothing. The refusal is audited: on the
secrets route as a refused fetch (SECRET_FETCH_REFUSED, reason RUNTIME_ID_NOT_OWNED), on every other
route as an audit row RUNTIME_ID_REFUSED on the runtime id, with a warning log line
security.ingestion_runtime_id_refused. It is separate from 409 RUNTIME_ID_IN_USE, which is two live
processes polling as the same id.
Release
Section titled “Release”POST /api/ingestion-runtime/v1/leases/release
{ "runtimeId": "ingest-1", "instanceId": "7c2f0c1e-...", "ingestionIds": ["ing_..."], "goodbye": false }Answers 200 {"released": 1}. In one transaction each named lease the runtime holds ends now, so another runtime
takes it at its next poll instead of after expiry. Ids the runtime does not hold are ignored and not counted.
ingestionIds has at most 1000 entries. An instanceId other than the stored one is 409 RUNTIME_ID_IN_USE.
goodbye: true marks the runtime gone: it stops counting as live at once. The runtime calls it only for routes
it has actually stopped: after a rebalance (goodbye: false) and at shutdown (goodbye: true, always, even with
nothing to release), never from its watchdog. An older platform answers 404; the runtime then stops calling it
until restart.
Report
Section titled “Report”POST /api/ingestion-runtime/v1/report: idempotent per window, with the lease checked.
| Field | Meaning |
|---|---|
routes[] (max 2000) |
{ingestionId, version, status: STARTED | FAILING | FAILED, error?}. FAILING is running but the source keeps failing; FAILED could not be built or started. |
metrics[] (max 2000) |
Exchange windows: {ingestionId, from, to, completed, failed, records, dispatchJobs, polls?, lastPollAt?}. polls counts finished polls, empty ones included. |
failures[] (max 500) |
{ingestionId, version, at, kind: REJECTED | NOT_DISPATCHED | SOURCE | AUTH, category?: payload | rejected, message, afterRecords?, excerpt?}. category: rejected means the platform permanently refused the runtime’s jobs request (the target no longer resolves, the client is suspended); it is a notice until someone dismisses it. The excerpt (at most 2 KB) is kept only for an ingestion that keeps failed payloads. |
tests[] (max 20) |
Answers to test requests: {id, outcome: RESULTS | NO_RESULTS | REFUSED | FAILED | NOT_SUPPORTED, steps[] (max 50), records?, excerpt?}. A step contains no secret or token. |
Times more than five minutes ahead of the platform’s clock are recorded as its now; rows are kept by the time the platform wrote them. NUL characters in report text are dropped before storing.
POST /api/ingestion-runtime/v1/ingestions/{id}/jobs?runtimeId=
{ "records": [ { "payload": "{\"id\":1}", "payloadContentType": "application/json", "messageGroup": "tenant-7", "externalId": "<sha256 hex of the record's source identity>", "correlationId": "...", "subject": "..." }] }Up to 1000 records and 10 MiB per request. Per record: payload (text), payloadContentType (default
application/json, at most 100 characters), messageGroup (at most 200), externalId (at most 100; the
runtime sends the sha256 hex, 64 characters), correlationId (at most 100), subject (at most 500).
Response:
{ "kind": "DISPATCH_JOB", "created": 2, "results": [ { "index": 0, "id": "djb_..." }, { "index": 1, "id": "djb_...", "existing": true }, { "index": 2, "error": "..." } ] }kindis the ingestion target’s kind:DISPATCH_JOBorEVENT(for an event target eachidis an event’s id, stored through thePOST /api/events/batchinsert path with sourceingestion:<application>:<code>, the ingestion’s client and, when the record has anexternalId, the deduplication iding:{ingestionId}:{externalId}).resultsis positional: one entry per record,{index, id, existing?}or{index, error}.- The platform builds every job from the ingestion’s own target, resolved as at save: code, URL, pool,
connection (the job carries
connection_id, so pausing the connection holds it), the signer, the mode, the ingestion’s client. A record carries only the record; a field naming any of those is refused, so the runtime can neither choose nor alter them. This is not the batch dispatch-job API. externalIdis the record’s idempotency key within the ingestion (kept 7 days): sending it again answers the job it made first (existing: true), also within one request, where the earlier record wins.- Event data is the record when its content type is JSON and it parses; else
{"contentType","body"}when the target haswrapNonJson, else that record’s result is an error.
Refusals: 404 unknown ingestion; 409 INGESTION_NOT_LIVE (paused or no live version); 409 INGESTION_TARGET_INVALID
(the target no longer resolves); 409 RUNTIME_KIND_NOT_CARRIED (the runtime has not polled or does not carry the
kind); 409 LEASE_NOT_HELD (for a polled source; checked in the transaction that makes the jobs, with the lease row
locked until it commits); 409 CLIENT_NOT_ACTIVE. A record that cannot be a job (no payload, a field over its length)
gets its own error; the rest are made. A runtime acknowledges its source (deletes the queue message, moves the file) only after the platform has answered successfully.
Secrets
Section titled “Secrets”GET /api/ingestion-runtime/v1/ingestions/{id}/secrets/{name}?runtimeId= answers {"value", "updatedAt"}
with Cache-Control: no-store, for a secret the ingestion’s live definition names, read at the ingestion’s own
client with no fall-back to a global value. A name the definition does not reference, or that has no value, is
404 SECRET_NOT_FOUND. The same kind, lease, liveness and client-status checks as jobs apply. A secret whose value
is an external reference (aws-sm://..., aws-ps://...) is resolved by the platform at this call; a refusal
reaches the runtime as 409 with a SECRET_REFERENCE_* code, or 503 SECRET_REFERENCE_UNAVAILABLE when the store
cannot be reached.
This is not a configuration reveal and is not audited per read: every successful fetch is security telemetry
(a log line security.ingestion_secret_fetch with the secret name and never the value; the counter
fc_ingestion_secret_fetch_total{outcome}; a last-fetched record per ingestion, secret and runtime). A refused fetch
is audited as SECRET_FETCH_REFUSED. A runtime re-reads each secret about once a minute per route.
GET/PUT /api/ingestion-runtime/v1/state/{ingestionId}/{key}?runtimeId=: small values a runtime keeps through the
platform (a watermark, a cursor), {"value": "<up to 4000 characters>"}. A write from a runtime without the lease is
409 LEASE_NOT_HELD.
Traces
Section titled “Traces”POST /api/ingestion-runtime/v1/traces with {runtimeId, records[] (max 500)}; answer {accepted, dropped}. A record is
{id?, ingestionId, version, windowId, captureId, at (unix ms), kind: poll \| exchange \| http \| error, level: info \| warn \| error, message (cut to 1000 characters), data?}. The platform refuses records dated after a window’s hard stop
(plus 10 seconds of slack). The runtime redacts credentials before records leave it. See the Traces section of
Ingestion.
The HTTP listener
Section titled “The HTTP listener”An http source is a push endpoint served by the runtime, not the platform: default 0.0.0.0:8091
(HTTP_PORT, HTTP_HOST; under fcdev, http://127.0.0.1:8091), which also serves /health/live and
/health/ready.
POST /ingest/{client}/{code}POST /ingest/{application}/{client}/{code}{client} is the client’s identifier or its platform id. The short form is enough while one application has an
ingestion of that code for the client; when two do it answers 409 AMBIGUOUS. Only POST is served; an unknown
ingestion, or one that is not an http source, is 404. Checks run in order and the first to fail answers: the
ingestion, the login, the rate limit, accept (media type), the headers, the body.
Request headers
Section titled “Request headers”| Header | Meaning |
|---|---|
Authorization |
Per the source’s auth: bearer secret, basic, or a platform access token. |
Idempotency-Key |
Names the request. Each record is keyed by it and its position, so sending the same request again makes nothing new and the answer carries the same ids. Without it a resend makes everything again. |
X-Message-Group |
1 to 128 of A-Z a-z 0-9 _ . : -, else 400 INVALID_MESSAGE_GROUP. Every record gets the group {ingestionId}:{value}. Without it the group is {ingestionId}: plus a hash of the Idempotency-Key (else of the payload). |
X-Correlation-Id |
At most 100 characters, else 400 INVALID_CORRELATION_ID. Becomes every record’s correlation id (default: the record’s group). |
Content-Type |
Compared with accept.contentTypes. |
Answers
Section titled “Answers”| Status | Body | Meaning |
|---|---|---|
202 |
{"accepted": true, ...} |
The platform has the jobs (or events). Only now is it safe to forget the payload. |
503 |
{"error":"UNAVAILABLE"} |
The platform has none of them, or only some: send the same request again. |
422 |
REFUSED or UNPROCESSABLE |
The platform refused the records for good, or the payload could not be read. Do not resend it unchanged. |
429 |
{"error":"RATE_LIMITED"} with Retry-After |
The ingestion’s rateLimit, or too many failed logins from this address (20 in a minute, answered without checking credentials). |
401 |
Missing or wrong credential. | |
403 |
FORBIDDEN |
A valid platform token whose principal lacks the client, the application or the named principal. |
404, 409 AMBIGUOUS |
As above. | |
415 |
UNSUPPORTED_MEDIA_TYPE |
A media type accept does not take, or none when a list is given. |
400 |
EMPTY_BODY, INVALID_JSON, PAYLOAD_MUST_BE_A_NON_EMPTY_JSON_OBJECT, INVALID_XML, INVALID_MESSAGE_GROUP, INVALID_CORRELATION_ID |
The body or headers are not acceptable. |
Every refusal is {"error": CODE, "message"?}. The 202 names what was made, in record order:
| Target | Split none |
Any other split |
|---|---|---|
| dispatch job | {"accepted": true, "jobId": "..."} |
{"accepted": true, "jobIds": ["...", "..."]} |
| event | {"accepted": true, "eventId": "..."} |
{"accepted": true, "eventIds": ["...", "..."]} |
A payload that makes no records has an empty list, or {"accepted": true} alone for a blank body. A resend under
the same Idempotency-Key answers the same ids. If the platform’s keys or the secret store cannot be read, the
answer is 503 and does not count against the address’s failed-login budget.
Source-specific behaviour
Section titled “Source-specific behaviour”- sqs: long-polls (20 s), up to 10 messages a poll. The route deletes a message itself once its exchange ends
without failing (jobs made, or rejected as unreadable or refused for good). A message the platform did not take
is not deleted and returns after the queue’s visibility timeout. Give every source queue a dead-letter queue
(redrive policy,
maxReceiveCount5 to 10): the platform keeps a record’s identity for 7 days and SQS keeps a message up to 14.