Skip to content

Ingestion runtime

Ingestion runtime: 8 operations, tagged ingestion-runtime in the OpenAPI document.

Method Path Summary
POST /api/ingestion-runtime/v1/ingestions/{id}/jobs Create dispatch jobs from records, under the ingestion’s own target (ingestion runtime only)
GET /api/ingestion-runtime/v1/ingestions/{id}/secrets/{name} Fetch a secret the ingestion’s live definition binds (ingestion runtime only; security telemetry, not an audited reveal)
POST /api/ingestion-runtime/v1/leases/release A runtime hands back the leases of single-owner routes it has stopped, and says goodbye at shutdown (ingestion runtime only)
POST /api/ingestion-runtime/v1/poll A runtime asks what it should run (ingestion runtime only)
POST /api/ingestion-runtime/v1/report A runtime reports route states, exchange windows, failures and test answers (ingestion runtime only)
GET /api/ingestion-runtime/v1/state/{ingestionId}/{key} Read a value a polled source keeps (lease holder only)
PUT /api/ingestion-runtime/v1/state/{ingestionId}/{key} Store a value a polled source keeps (lease holder only)
POST /api/ingestion-runtime/v1/traces Ship trace records captured inside an ingestion’s open trace window (ingestion runtime only)

POST /api/ingestion-runtime/v1/ingestions/{id}/jobs

Section titled “POST /api/ingestion-runtime/v1/ingestions/{id}/jobs”

Create dispatch jobs from records, under the ingestion’s own target (ingestion runtime only)

Operation ID: ingestionRuntimeCreateJobs

Parameters

Name In Type Required Description
id path string yes
runtimeId query string yes The sending runtime, which must belong to the caller’s account, carry the ingestion’s kind and for a polled source hold its lease Pattern ^[A-Za-z0-9._:-]{1,100}$.

Request body (required)

Content type Schema
application/json CreateJobsRequest

Responses

Status Description Body
200 OK application/json CreateJobsResponse
default Error application/json ErrorModel

GET /api/ingestion-runtime/v1/ingestions/{id}/secrets/{name}

Section titled “GET /api/ingestion-runtime/v1/ingestions/{id}/secrets/{name}”

Fetch a secret the ingestion’s live definition binds (ingestion runtime only; security telemetry, not an audited reveal)

Operation ID: ingestionRuntimeGetSecret

Parameters

Name In Type Required Description
id path string yes
name path string yes A secret the ingestion’s live definition names Pattern ^[A-Za-z0-9._:-]{1,201}$.
runtimeId query string yes The asking runtime, which must belong to the caller’s account, carry the ingestion’s kind and for a polled source hold its lease Pattern ^[A-Za-z0-9._:-]{1,100}$.

Responses

Status Description Body
200 OK application/json SecretValue
default Error application/json ErrorModel

POST /api/ingestion-runtime/v1/leases/release

Section titled “POST /api/ingestion-runtime/v1/leases/release”

A runtime hands back the leases of single-owner routes it has stopped, and says goodbye at shutdown (ingestion runtime only)

Operation ID: ingestionRuntimeReleaseLeases

Request body (required)

Content type Schema
application/json ReleaseRequest

Responses

Status Description Body
200 OK application/json ReleaseResponse
403 Forbidden application/json ErrorModel
409 Conflict application/json ErrorModel
422 Unprocessable Entity application/json ErrorModel
500 Internal Server Error application/json ErrorModel

A runtime asks what it should run (ingestion runtime only)

Operation ID: ingestionRuntimePoll

Request body (required)

Content type Schema
application/json PollRequest

Responses

Status Description Body
200 OK application/json PollResponse
403 Forbidden application/json ErrorModel
409 Conflict application/json ErrorModel
422 Unprocessable Entity application/json ErrorModel
426 Upgrade Required application/json ErrorModel
500 Internal Server Error application/json ErrorModel

A runtime reports route states, exchange windows, failures and test answers (ingestion runtime only)

Operation ID: ingestionRuntimeReport

Request body (required)

Content type Schema
application/json ReportRequest

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

GET /api/ingestion-runtime/v1/state/{ingestionId}/{key}

Section titled “GET /api/ingestion-runtime/v1/state/{ingestionId}/{key}”

Read a value a polled source keeps (lease holder only)

Operation ID: ingestionRuntimeGetState

Parameters

Name In Type Required Description
ingestionId path string yes
key path string yes Pattern ^[A-Za-z0-9._:-]{1,100}$.
runtimeId query string yes The asking runtime, which must belong to the caller’s account and hold the ingestion’s lease Pattern ^[A-Za-z0-9._:-]{1,100}$.

Responses

Status Description Body
200 OK application/json StateValue
default Error application/json ErrorModel

PUT /api/ingestion-runtime/v1/state/{ingestionId}/{key}

Section titled “PUT /api/ingestion-runtime/v1/state/{ingestionId}/{key}”

Store a value a polled source keeps (lease holder only)

Operation ID: ingestionRuntimePutState

Parameters

Name In Type Required Description
ingestionId path string yes
key path string yes Pattern ^[A-Za-z0-9._:-]{1,100}$.
runtimeId query string yes The writing runtime, which must belong to the caller’s account and hold the ingestion’s lease Pattern ^[A-Za-z0-9._:-]{1,100}$.

Request body (required)

Content type Schema
application/json StateValue

Responses

Status Description Body
204 No Content none
default Error application/json ErrorModel

Ship trace records captured inside an ingestion’s open trace window (ingestion runtime only)

Operation ID: ingestionRuntimeTraces

Request body (required)

Content type Schema
application/json IngestionTraceBatch

Responses

Status Description Body
202 Accepted application/json IngestionTraceAck
default Error application/json ErrorModel
Field Type Required Description
records JobRecord[] yes Max items 1000.
Field Type Required Description
created integer (int64) yes Jobs or events made by this request; records answered with an existing one are not counted
kind string yes What the ingestion’s target makes of a record; results[].id is a dispatch job’s id or an event’s One of: DISPATCH_JOB, EVENT.
results JobResult[] yes
Field Type Required Description
completed integer (int64) yes Minimum 0.
dispatchJobs integer (int64) yes Minimum 0.
failed integer (int64) yes Minimum 0.
from string (date-time) yes
ingestionId string yes
lastPollAt string (date-time) no When the last poll in the window ended
polls integer (int64) no Polls finished in the window, empty ones included Minimum 0.
records integer (int64) yes Minimum 0.
to string (date-time) yes
Field Type Required Description
afterRecords integer (int64) no How many of the payload’s records were read before it failed Minimum 0.
at string (date-time) yes
category string no payload (the default): a record or payload the runtime could not take. rejected: the platform refused the runtime’s jobs request permanently; the ingestion shows it as a notice until someone dismisses it. One of: payload, rejected.
excerpt string no The start of what it failed on; the platform keeps it only for an ingestion that keeps failed payloads Max length 2048.
ingestionId string yes
kind string yes One of: REJECTED, NOT_DISPATCHED, SOURCE, AUTH.
message string yes Max length 2000.
version integer (int64) yes Minimum 0.
Field Type Required Description
accepted integer (int64) yes
dropped integer (int64) yes
Field Type Required Description
records IngestionTraceRecord[] yes Max items 500.
runtimeId string yes Pattern ^[A-Za-z0-9._:-]{1,100}$.
Field Type Required Description
at integer (int64) yes Unix milliseconds, the runtime’s clock
captureId string yes Shared by the records of one capture
data any no Cut to a stub over 80 KiB
id string no
ingestionId string yes
kind string yes poll, exchange, http or error
level string yes info, warn or error
message string yes One line; cut to 1000 characters
version integer (int64) yes Minimum 0.
windowId string yes
Field Type Required Description
correlationId string no At most 100 characters
externalId string no The record’s idempotency key within the ingestion, at most 100 characters (the runtime sends the sha256 hex of the record’s source identity, 64): sending it again answers the job it made first, and of two records in one request with the same key the first makes the job
messageGroup string no Orders the jobs of a group within the target’s mode; at most 200 characters
payload string yes The record, as text
payloadContentType string no Defaults to application/json; at most 100 characters
subject string no At most 500 characters
Field Type Required Description
error string no
existing boolean no
id string no
index integer (int64) yes
Field Type Required Description
builtinKinds string[] no The built-in source kinds the runtime carries (http, sftp, s3, sqs, rabbitmq, database-poll, api-poll); absent is all of them. Only ingestions of a kind the runtime carries are listed to it, and a polled kind’s fair share counts only the runtimes that carry it. Max items 50.
contractVersion integer (int64) yes The contract version the runtime speaks; the platform serves the current one and the one before it Minimum 0.
instanceId string no The runtime process, new on every start (a random UUID). While another instance that polled as this runtimeId is live (polled within one lease and has not said goodbye since), the poll is refused with 409 RUNTIME_ID_IN_USE and changes nothing. Absent: no check. Pattern ^[A-Za-z0-9-]{8,64}$.
kinds RuntimeKind[] no The kinds the runtime’s extensions add (and camel-route) Max items 100.
runtimeId string yes The asking runtime; unique among running runtimes. The first poll registers the id to the calling service account; a call naming it from another account is refused with 403 RUNTIME_ID_NOT_OWNED on every runtime route. Pattern ^[A-Za-z0-9._:-]{1,100}$.
url string no Where the runtime can be reached; informational, the platform never calls it Max length 500. Pattern ^https?://[^\s]+$.
Field Type Required Description
asOf string (date-time) yes When the platform read them
ingestions RuntimeIngestion[] yes Live versions only: every shared ingestion of a kind the runtime carries, and the polled ones whose lease it holds
leaseFor string yes
tests RuntimeTest[] yes Pending test requests for kinds the runtime carries
traces RuntimeTrace[] no The open trace windows (hardStop in the future) of the ingestions listed above, for this runtime; absent when none. A windowId seen for the first time starts the runtime’s own window of windowSecs, ending no later than hardStop; the same windowId again changes nothing; a different one replaces the window; an ingestion no longer listed has none.
Field Type Required Description
goodbye boolean yes The runtime is shutting down: it stops counting as live at once, for fair shares and for the instance guard.
ingestionIds string[] yes Single-owner ingestions whose routes have stopped; their leases end now. One the runtime does not hold is ignored. Max items 1000.
instanceId string no The runtime process, as on poll. When it differs from the instance stored for runtimeId the release is refused with 409 RUNTIME_ID_IN_USE and changes nothing. Pattern ^[A-Za-z0-9-]{8,64}$.
runtimeId string yes The releasing runtime, which must belong to the caller’s account (else 403 RUNTIME_ID_NOT_OWNED) Pattern ^[A-Za-z0-9._:-]{1,100}$.
Field Type Required Description
released integer (int64) yes How many of the named leases the runtime held and now has ended
Field Type Required Description
failures Failure[] no Max items 500.
metrics ExchangeWindow[] no Max items 2000.
routes RouteState[] no Max items 2000.
runtimeId string yes Pattern ^[A-Za-z0-9._:-]{1,100}$.
tests TestAnswer[] no Max items 20.
Field Type Required Description
error string no Max length 2000.
ingestionId string yes
status string yes STARTED is running, FAILING is running but the source keeps failing, FAILED could not be built or started One of: STARTED, FAILING, FAILED.
version integer (int64) yes Minimum 0.
Field Type Required Description
applicationCode string yes
clientId string yes
clientIdentifier string yes
code string yes
id string yes
keepFailedPayloads boolean yes
name string yes
source any yes
split any yes
target Target yes
version integer (int64) yes The live version; a runtime rebuilds the route when it differs
Field Type Required Description
description string no Max length 500.
kind string yes Max length 50. Pattern ^[a-z0-9][a-z0-9-]*$.
requiredPermission string no Max length 200.
settings any no
Field Type Required Description
expiresAt string (date-time) yes
id string yes Answer it in the next report under tests
ingestion RuntimeIngestion yes
Field Type Required Description
hardStop string (date-time) yes The runtime never captures past this, and the platform refuses records dated after it (plus a short grace)
ingestionId string yes
sampleEverySecs integer (int64) yes The runtime starts a capture of this ingestion at most this often
windowId string yes A new id every time tracing is switched on
windowSecs integer (int64) yes How long the runtime captures, counted from when it first sees this windowId
Field Type Required Description
updatedAt string (date-time) yes
value string yes
Field Type Required Description
value string yes Max length 4000.
Field Type Required Description
batchSize integer (int64) yes
code string yes A dispatch job’s code, application:subdomain:aggregate:action; for an EVENT target, the code of an existing event type
connection string no
dataOnly boolean no DISPATCH_JOB only: deliver the record as it is, with its own content type, instead of the platform envelope
kind string no What each record becomes; DISPATCH_JOB when absent One of: DISPATCH_JOB, EVENT.
mode string no Not for an EVENT target
pool string no Not for an EVENT target
serviceAccount string no
targetUrl string no The delivery URL. May be left out only when the source names a config entry whose value gives it (exactly one of the two). Not for an EVENT target
wrapNonJson boolean no EVENT only: deliver a record that is not JSON as {contentType, body}. Required unless the records are known to be JSON
Field Type Required Description
excerpt string no The start of the answer; the platform keeps it only if the tested definition keeps failed payloads Max length 2048.
id string yes
outcome string yes One of: RESULTS, NO_RESULTS, REFUSED, FAILED, NOT_SUPPORTED.
records integer (int64) no Minimum 0.
steps string[] yes What happened, step by step, for a person; no secret or token Max items 50.