Ingestion definition format
An ingestion takes data from wherever a system keeps it, splits each payload into records, and turns every record into a dispatch job (or a platform event). This page is the exact format of an ingestion definition, as a YAML or JSON file or as the API body. For the idea see Ingestion; for the HTTP endpoint see Ingestor runtime contract.
ingestion = (application, client, code) + source + split + target + flagsDecoding is strict: an unknown field anywhere is an error. Validation reports every problem at once, each
with a dotted field path (source.every, target.batchSize) and a code.
Top-level fields
Section titled “Top-level fields”| Field | Type | Meaning |
|---|---|---|
application |
string | Required. The owning application’s code; the application must be of type INTEGRATION. It carries the permissions, the audit scope and the answer to “who owns this”. |
client |
string | Required (or clients). A client id (clt_...) or identifier. There is no client-less ingestion. |
clients |
list or "*" |
In place of client: one ingestion per client (see below). |
code |
string | Required. Stable, lower-case, unique within (application, client). |
name |
string | A label. |
active |
boolean | Three states in a file: true, false, or not said. Not said: an ingestion whose source names a settings entry is created paused, any other is created active, and an existing one keeps its state. When said, every apply enforces it. |
keepFailedPayloads |
boolean | Off unless the client has agreed. When on, a failure may keep the first 2 KB of the payload that failed. |
source |
object | Where the data comes from. |
split |
object | How a payload becomes records. Required. |
target |
object | What each record becomes. Required. |
An ingestion is addressed as application/client/code (for example ingest/acme/orders-sftp), or by its
ing_ id.
source
Section titled “source”source.kind selects the kind. A source never holds a secret, only a secret reference (below).
| Kind | Reads | Runs on |
|---|---|---|
http |
Data pushed to the runtime over HTTP | Every runtime that carries it |
sftp |
Files in a directory, polled | One runtime at a time (lease) |
s3 |
Objects under a bucket prefix, polled | One at a time |
sqs |
Messages from a queue | Every runtime |
rabbitmq |
Messages from a queue | Every runtime |
database-poll |
A table or view, polled | One at a time |
api-poll |
An HTTP API, polled | One at a time |
custom |
A kind a runtime adds as an extension | One at a time |
GET /api/ingestion-source-kinds lists the built-in kinds and the ones the live runtimes report. In a
definition file an extension’s source is written flat (kind: camel-route, then its settings); in JSON it is
{"kind": "custom", "type": "camel-route", "settings": {...}}. A kind can declare that saving one needs a
special permission (a Camel route needs platform:ingestion:ingestion:route).
Common types
Section titled “Common types”- Secret reference:
{"name": "sftp-password"}. The name is a secret held at the ingestion’s client (sftp-passwordorfiles:sftp-password). A definition never holds a value. - Duration: ISO 8601 days, hours, minutes and seconds:
PT30S,PT5M,PT1H,P1D. No negative values. Poll intervals (every,idleDelay) must be between one second and one day. - AWS credential:
{accessKeyId, secretAccessKey: <secret reference>}.
| Field | Meaning |
|---|---|
auth |
Required. One of the three below. |
accept |
Optional {contentTypes[], body}. |
rateLimit |
Optional {requests, per}: requests 1 to 1 000 000, per a duration from 1 ms to 1 day. Counted per runtime. |
auth.kind:
| Kind | Fields | Checks |
|---|---|---|
bearer |
token (secret reference) |
The Authorization: Bearer token equals the secret. |
basic |
username, password (secret reference) |
The user name equals username (no :) and the password equals the secret. |
flowcatalyst-token |
application (code), principalId? (prn_...) |
A platform access token whose principal may act for the ingestion’s client and use the named application. principalId narrows it to one principal. A service account’s sac_ id is not in its tokens: name its principal. |
accept.contentTypes: media types as type/subtype, without parameters, compared case-insensitively;
absent or empty accepts any. accept.body: NONE (default), JSON (one JSON value), JSON_OBJECT (a
non-empty object), XML (well-formed, no DOCTYPE).
| Field | Meaning |
|---|---|
host, port |
Host name; port 1 to 65535 (required; there is no default). |
directory, username |
|
credential |
Secret reference for the password. |
knownHosts |
The server’s known_hosts line. Without it the runtime refuses to start the source unless acceptAnyHostKey is true. |
acceptAnyHostKey |
true connects without checking who the server is; not together with knownHosts. Needs bind-secrets. |
include |
A file name pattern such as *.csv; absent takes every file. |
every |
Poll interval. |
region, bucket, prefix? (folder names each ending in /, not starting with .), every, and
credential? (AWS credential). Without a credential the runtime reads with its own AWS identity, which
needs platform:ingestion:ingestion:runtime-identity to save.
region, queue (the queue name, not its URL), credential? (AWS credential; without it, the runtime’s
own identity).
rabbitmq
Section titled “rabbitmq”uri (amqp://host or amqps://host, without a login), queue (at most 255 characters), username,
password (secret reference).
database-poll
Section titled “database-poll”Each row is one record, so split must be none.
| Field | Meaning |
|---|---|
jdbcUrl |
Must start with jdbc: and name its server (jdbc:<driver>://host:port/...). Embedded databases, files, TNS aliases and driver properties that load code or read files are refused. |
username, password |
Secret reference for the password. |
table |
A plain name or schema.table. |
track |
Required. How read rows are told from unread: {kind: watermark, column, type: NUMBER or TIMESTAMP} (rows in the order of a growing column; the highest value read is kept outside the table), or {kind: status, column, keyColumn, pending, processed} (rows whose status column holds pending, set to processed once dispatched; the two values must differ). |
maxRows |
1 to 10 000 per poll. |
every |
Poll interval. |
api-poll
Section titled “api-poll”One request per poll to an HTTP API; the answer is split.
| Field | Meaning |
|---|---|
url |
http or https, without a login or a #fragment. |
method |
GET or POST. |
headers |
[{name, value}]. Not secret; reserved headers are set by the runtime. No line breaks. |
body |
A POST body. POST only. |
auth |
Required: {kind: none}, basic {username, password}, bearer {token}, api-key {header, value}, oauth-client-credentials {tokenUrl, clientId, clientSecret, scope?, audience?, credentialsIn: BASIC_HEADER or BODY}, or login {url, format: FORM or JSON, usernameField, passwordField, username, password, extraFields?, tokenPath, expiresInPath?, lifetime, header, prefix}. lifetime is 10 seconds to a day. |
results |
Required: how an answer is told to have results: {kind: records} (the split makes at least one record), {kind: json-path, path} (the path holds a non-empty array or a value that is not null, false or empty), or {kind: header, name, equals?}. Paths are $ followed by .field or [n] steps. |
cursor |
Optional {from, param, initial?}: from is a path in the answer (such as $.next), param the query parameter it is sent in. |
every, idleDelay |
The wait after an answer with results, and after one without. |
custom
Section titled “custom”{type, settings}. type is lower-case words joined by -, not a built-in kind. Settings are text,
numbers, booleans or lists of text; a secret setting holds the secret’s name. An extension kind’s settings
are checked against the schema its live runtime reports.
Where a source may point
Section titled “Where a source may point”Every address a source makes the runtime connect to is checked when the ingestion is saved and tested.
Private networks are allowed (an on-premises database is the normal case). Refused: the runtime’s own machine
(loopback, localhost), link-local addresses, cloud metadata services, unspecified and multicast addresses,
and hosts written as bare numbers.
| Kind | Fields | Records |
|---|---|---|
none |
The payload is one record. | |
csv |
header (boolean) |
One per row; header: true when the first row names the columns. |
json |
arrayPath |
One per element of the array at arrayPath: $ for a top-level array, or $.field.field (fields only; the document is streamed). |
xml |
element |
One per occurrence of the named element. |
A record’s content type is what the split makes of it: application/json, application/xml or text/csv.
With split none on an HTTP source it keeps the Content-Type the caller sent.
target
Section titled “target”| Field | Meaning |
|---|---|
kind |
DISPATCH_JOB (default when absent) or EVENT. |
code |
For a job: the dispatch job’s code application:subdomain:aggregate:action; its first part must be the ingestion’s own application. For an EVENT: the code of an existing event type (application:subdomain:aggregate:event). |
targetUrl |
The delivery URL (http or https), checked with the outbound-URL guard. May be left out only when the source names a settings entry whose value gives it: exactly one of the two. Not for EVENT. |
pool |
A dispatch pool code; it must exist and be usable by the client. Not for EVENT. |
connection |
Optional connection code. Its service account signs each delivery, and pausing it holds the ingestion’s jobs. Not for EVENT. |
serviceAccount |
Optional service account code, to sign without a connection. Not together with connection; it must be one of the ingestion’s application’s accounts that reaches the ingestion’s client. Not for EVENT. |
mode |
IMMEDIATE, NEXT_ON_ERROR or BLOCK_ON_ERROR. Not for EVENT. |
batchSize |
Required, 1 to 1000 records per batch. |
dataOnly |
DISPATCH_JOB only. Deliver the record itself, with its own content type, instead of the platform envelope. |
wrapNonJson |
EVENT only. Deliver a record that is not JSON as {"contentType","body"}. Required unless the records are known to be JSON (a json split, or split none on an HTTP source whose accept.body is JSON or JSON_OBJECT). |
With neither connection nor serviceAccount the delivery is unsigned. An EVENT target stores one event
per record through the same path as POST /api/events/batch, with source ingestion:{application}:{code};
its subscriptions deliver it. A record with an externalId is stored once per ingestion. Anything that does
not resolve (a pool, a connection, an account) is a 400 when the ingestion is saved, not a failure in the
runtime later.
Per-environment settings
Section titled “Per-environment settings”A definition file is the same in every environment. What differs per environment or client (a vendor’s login, an organisation id, a delivery address) lives in the platform’s configuration, and the source names it:
source: kind: api-poll # a built-in kind, or `kind: custom` with `type` config: vendor-feed # the entry's key; or `config: true` for the ingestion's own codeA source holds its settings inline or names an entry, never both. The entry is platform configuration of
the ingestion’s application, section ingest, property = the key, scope CLIENT = the ingestion’s client,
type PLAIN. Its value is a JSON object: the kind’s settings (and optionally targetUrl). It is written only
through the ingestion (PUT /api/ingestions/{id}/config, fcdev ingest config set), and secrets stay in
section secrets at the client. An ingestion whose entry is missing or invalid is not listed to any runtime
and shows as needing configuration; it starts by itself once the entry is valid. See
Platform configuration and secrets.
One definition for several clients
Section titled “One definition for several clients”application: ingestclients: [acme, globex, clt_0ABCDEFGHJKMN]code: fuel-pricessource: { kind: http }This is read as one ordinary definition per client, in the order listed, each with its own settings, secrets,
leases, failures and pause. clients: "*" stands alone and is resolved at apply time to every client that
exists then (a client made later gets its ingestion at the next apply); only a caller that reaches every client
may use it. A client may not be listed twice, client and clients may not both be given, and the same
(application, client, code) may not come from two definitions.
Complete examples
Section titled “Complete examples”A polled file source, delivered as jobs:
application: ingestclient: acmecode: orders-sftpname: Orders over SFTPsource: kind: sftp host: sftp.example.com port: 22 directory: /in/orders username: feed credential: { name: sftp-password } knownHosts: sftp.example.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... every: PT5Msplit: kind: csv header: truetarget: code: ingest:orders:order:received targetUrl: https://hooks.example.com/orders pool: orders connection: orders-conn mode: NEXT_ON_ERROR batchSize: 100A pushed JSON source, delivered as events:
application: shop-integrationclient: acmecode: ordersname: Orders (push)source: kind: http auth: { kind: bearer, token: { name: orders-push-token } } accept: { contentTypes: [application/json], body: JSON }split: kind: json arrayPath: $.orderstarget: kind: EVENT code: shop:orders:order:received batchSize: 100Sets and plans
Section titled “Sets and plans”A folder of files is applied as one set. For each definition the plan is:
| Plan | When |
|---|---|
create |
No ingestion has that (application, client, code). |
unchanged |
The set owns it and it says the same. |
change |
The set owns it and it differs: saved as the next live version. active is set only when the file says it. |
adopt |
It was made by hand: taken into the set (a new version only if it differs). |
remove |
The set owns it but no longer lists it: deleted, with its versions, leases and state. |
An apply is one transaction; an ingestion owned by another set is 409 INGESTION_SET_OWNED, and any
unresolvable definition fails the whole apply. While a set owns an ingestion it is read-only (pause and
resume still work). Each apply that changed something is kept with its files, the newest 10 per set. A save
is deduplicated by the definition’s digest (sha256 of its canonical form). See
fcdev ingest for the commands.
Limits worth knowing
Section titled “Limits worth knowing”| Item | Limit |
|---|---|
target.batchSize |
1 to 1000 |
source.rateLimit.requests |
1 to 1 000 000 |
source.maxRows |
1 to 10 000 |
Poll every |
1 second to 1 day |
Login lifetime |
10 seconds to 1 day |
| Failure and exchange retention | 30 days; job idempotency keys one week |
| Trace record retention | 7 days (FC_INGESTION_TRACE_RETENTION_DAYS) |