Keyboard shortcuts

Press ← or → to navigate between chapters

Press ? to show this help

Press Esc to hide this help

Engine

The engine, its interfaces and live updates.

GET /api/v1/engine

The engine: version, environment, uptime, drain state.

Who may call it: anyone signed in (a person or a token).

Answers

GET /api/v1/events

Live updates (Server-Sent Events): an update event with every interface's queues, health and the drain state, sent at once and then whenever a count or a health state changes or a delivery finishes (checked every 2 s).

Who may call it: anyone signed in (a person or a token).

Answers

  • 200 text/event-stream of update events (text/event-stream): LiveUpdate

GET /api/v1/health

Is the engine up? Needs no token (for load balancers and monitoring).

Who may call it: anyone, without signing in.

Answers

  • 200 (application/json): Health

GET /api/v1/hotspots

Where each destination's backlog sits: the lanes messages wait in (the ordering key's hash), the first message of each, and which worker a failing message holds up. Only destinations with messages waiting are listed.

Who may call it: anyone signed in (a person or a token).

Parameters

InType
interfacequerytextOnly this interface's destinations.
lanesquerynumberLanes to list per destination, most waiting first (default 10, at most 1000). Lanes whose first message is failing, and lanes no worker reads, are always listed.

Answers

GET /api/v1/interfaces

Every interface with its state and each destination's queue.

Who may call it: anyone signed in (a person or a token).

Answers

GET /api/v1/interfaces/{name}

One interface: its state, queues and what it connects.

Who may call it: anyone signed in (a person or a token).

Parameters

InType
name (required)pathtextInterface name.

Answers

POST /api/v1/interfaces/{name}/destinations/{destination}/pause

Pause a destination at once: nothing is sent or retried until it's resumed (a send under way finishes). Messages keep queueing. No reason needed; send one now or later (pausing again with a reason adds it). Survives restarts. Operator.

Who may call it: an operator or admin.

Parameters

InType
name (required)pathtextInterface name.
destination (required)pathtextDestination name (default for one given with destination:).

Body (application/json): PauseRequest

Answers

DELETE /api/v1/interfaces/{name}/destinations/{destination}/pause

Resume a paused destination: it sends its backlog in order. Operator.

Who may call it: an operator or admin.

Parameters

InType
name (required)pathtextInterface name.
destination (required)pathtextDestination name.

Answers

GET /api/v1/metrics

Metrics in Prometheus's text format: messages received and delivered, retries, timings (receipt to sent, sends, transforms, respond-mode requests, database and API calls), queue sizes, stopped interfaces, drain state.

Who may call it: anyone signed in (a person or a token).

Answers

  • 200 Prometheus text format (0.0.4) (text/plain): text

Shapes

The JSON bodies the operations above take and return.

AllowedName

FieldType
addresseslist of textThe addresses let in for it: the last lookup that found some (kept when a later one fails).
checked_at (optional)time (RFC 3339) or nullWhen it was last looked up.
error (optional)text or nullWhy the last lookup failed, if it did.
nametext

DestinationCounts

FieldType
filterednumber
latencyTimingFrom receipt to sent, waiting in the queue included.
quarantinednumber
retriesnumberTemporary failures (each retry counts).
sendTimingEach successful send (the receiver's time).
sentnumber
transformTimingThe destination's function.

DestinationHealth

FieldType
behind (optional)text or nullWhich behind limit is past: messages or age.
catch_up_s (optional)number or nullSeconds to catch up at the last few minutes' rates (only while catching up).
causeslist of textWhy a backlog grows: burst (more arriving than normal for this hour of the week), slow_receiver (each send slower than normal).
last_error (optional)LastError or null
last_sent (optional)time (RFC 3339) or nullWhen it last delivered (kept across restarts).
normalRatesNormal for this hour of the week, learned from the hours watched (none until then).
oldest_waiting_s (optional)number or nullSeconds the oldest waiting message has waited.
recent (optional)Rates or null
statetextok, behind (past its behind limit), error (has quarantined messages), stalled (messages wait, nothing finished for a minute) or paused (best to worst).
summarytextIn operations' words: "behind 1,240 (oldest 12 min), catching up ~6 min; burst: 400/min received (normal 80)".

DestinationHotspots

FieldType
destinationtext
findingslist of FindingInfo
interfacetext
laneslist of LaneInfoThe lanes with the most waiting, plus any blocked or unread one.
lanes_totalnumberLanes the interface has (ordering.partitions; 1 without an ordering key).
lanes_waitingnumber
pausedtrue or false
summarytextIn operations' words: "1,240 waiting in 3 of 64 lanes; worker 2 blocked by message ...".
waitingnumber
workerslist of WorkerInfoWorkers with something waiting.
workers_totalnumberWorkers each destination has (1 in the shared pool).

DestinationStatus

FieldType
connectortextWhere it sends: mllp lab.local:5000, http api billing /charges, file out.
healthDestinationHealthIts state and why: behind, stalled, errors, and how it compares with normal.
nametext
owner (optional)text or nullSet when it isn't the interface's owner.
paused (optional)PauseInfo or null
pendingnumberWaiting to be delivered.
quarantinednumberNeeding a person.
since_startDestinationCountsCounts and timings since the engine started.

DrainStatus

FieldType
pausedlist of textPaused destinations (interface/destination): they keep their messages and don't hold the drain up.
pendingnumberDeliveries still to go, over all interfaces.
since (optional)time (RFC 3339) or nullWhen draining started, or when it finished.
statetextaccepting, draining or drained.
stop_when_drainedtrue or falseThe engine exits once drained.
waiting_forlist of textInterfaces still holding pending deliveries (a destination that's down, or a stopped interface, keeps a drain from finishing).

EngineInfo

FieldType
drainDrainStatus
environmenttext
handover (optional)Handover or null
holds_interfacestrue or falseFalse while the engine has lost the database connection that holds its interfaces: sending, file pickup and schedules wait until it is back (receiving goes on).
hosttextThe server's name.
interfacesnumber
otherslist of OtherEngineOther engines running on this database, oldest first, and the interfaces each runs. An interface runs on one engine at a time.
resourceslist of ResourceCallsCalls from interface code to each database and API in resources.yaml (fetch: URLs called directly), since the engine started.
started_attime (RFC 3339)
stoppednumberInterfaces stopped because their code ran away (their messages wait).
uptime_secondsnumber
versiontext

ErrorBody

FieldType
errortextWhat went wrong, in plain words.

FindingInfo

FieldType
kindtextblocked (a message keeps failing; its worker's lanes wait), all_blocked (every worker is retrying: the receiver looks down), uneven (one worker has most of the backlog), hot_lane (one lane has most of it), unowned (a lane no worker reads).
lane (optional)number or null
share (optional)number or nullIts share of the backlog (0–1), for uneven and hot_lane.
texttext
worker (optional)number or null

Handover

FieldType
attime (RFC 3339)When it held the interfaces.
from_pidnumber
from_versiontextThe version it took over from.
sending_paused_msnumberFrom the old engine's stop until this one sent (receiving never stopped).

HeadInfo

The first message waiting in a lane: the next one its worker handles.

FieldType
attemptsnumberFailed attempts: above zero, its worker is retrying it and its lanes wait.
idnumberThe message (GET /messages/{id}).
last_attempt_at (optional)time (RFC 3339) or null
last_error (optional)text or null
ordering_key (optional)text or null
received_attime (RFC 3339)
waiting_snumber

Health

FieldType
draintextaccepting, draining or drained: a load balancer can stop sending when it isn't accepting.
statustextAlways ok when the engine answers.

InterfaceCounts

FieldType
duplicatesnumberStored as duplicates, not queued.
receivednumberStored and queued.
request_errors (optional)number or null
requests (optional)Timing or null
store_failuresnumberCouldn't be stored (the sender was told to retry).

InterfaceDetail

InterfaceStatus or object

InterfaceHealth

FieldType
last_received (optional)time (RFC 3339) or nullWhen something last arrived (kept across restarts).
statetextok, silent (nothing within active_within), missed (nothing by active_by) or stopped (best to worst).
summarytextIn operations' words: "silent: nothing received for 47 min".

InterfaceStatus

FieldType
acceptingtrue or falseFalse while draining.
description (optional)text or null
destinationslist of DestinationStatus
healthInterfaceHealthWhat it should have received (monitor: in interface.yaml), checked now.
isolationtextshared or dedicated.
nametext
owner (optional)text or null
retention_days (optional)number or nullDays its messages are kept, as configured (none in respond mode: it stores nothing). GET /retention has changes in progress.
since_startInterfaceCountsCounts since the engine started (they start at zero with it).
sourcetextWhere messages come from: mllp 0.0.0.0:6661, http POST /orders on 0.0.0.0:8080 (queue).
statetextrunning, or stopped (its code ran away: its messages wait until it's fixed and the engine restarted).
stopped_reason (optional)text or null
workersnumberParallel workers (dedicated) or 1 (shared).

LaneInfo

FieldType
headHeadInfo
lanenumber
waitingnumber
worker (optional)number or nullNone: no worker reads it (ordering.partitions was lowered while it had messages).

LastError

FieldType
attime (RFC 3339)
errortext

LiveDestination

FieldType
healthLiveHealthAs in GET /interfaces (an update is sent when a state changes, not as a summary's minutes tick on).
nametext
pausedtrue or false
pendingnumber
quarantinednumber

LiveHealth

FieldType
statetext
summarytext

LiveInterface

FieldType
acceptingtrue or false
destinationslist of LiveDestination
healthLiveHealthWhat it receives, as in GET /interfaces.
nametext
statetext

LiveUpdate

FieldType
attime (RFC 3339)
drainDrainStatus
interfaceslist of LiveInterface

OtherEngine

FieldType
environmenttext
hosttext
interfaceslist of textThe interfaces it runs (respond-mode HTTP interfaces aren't claimed, so not listed).
pidnumber
started_attime (RFC 3339)
versiontext

PauseInfo

FieldType
attime (RFC 3339)
bytextThe token that paused it.
reason (optional)text or nullWhy, once someone says (it can be added after the pause).
reason_at (optional)time (RFC 3339) or null
reason_by (optional)text or null

PauseRequest

FieldType
reason (optional)text or nullWhy (optional: pause first, explain after; pausing again with a reason adds it).

PauseStatus

FieldType
destinationtext
interfacetext
paused (optional)PauseInfo or null
pendingnumberMessages waiting for it.

Rates

FieldType
done_per_min (optional)number or nullMessages finished per minute (sent, filtered or quarantined).
received_per_min (optional)number or nullMessages arriving per minute.
send_ms (optional)number or nullA successful send's mean time.

ResourceCalls

FieldType
callsTiming
errorsnumberCalls that failed (network, SQL, timeout; an HTTP error status is an answer, not a failure).
kindtextdb, api or fetch.
nametext

SourceAllow

A listener's allow: list and how it's doing.

FieldType
entrieslist of textThe list as written: addresses, subnets and host names.
last_refused (optional)text or nullThe last refused connection's address and time.
last_refused_at (optional)time (RFC 3339) or null
nameslist of AllowedNameEach host name in it with what it resolves to now.
refusednumberConnections refused since the engine started (0 when this engine doesn't hold the listener).

SourceTls

TLS on an interface's listener.

FieldType
addresstextWhere: 0.0.0.0:6661, POST /orders on 0.0.0.0:8443 (queue).
certificatetextThe certificates: pair it presents.
clients_ca (optional)text or nullSenders need a certificate this CA (a certificates: entry) issued; none: any sender.
protocoltextMLLP over TLS or HTTPS.
subjectslist of textAnd one of these subjects (none: any the CA issued).

SystemInfo

FieldType
application (optional)text or null
vendor (optional)text or null

Timing

How long something took, over every time since the engine started (estimated from histogram buckets, like Prometheus does: good to a bucket's width).

FieldType
countnumber
mean_ms (optional)number or null
p50_ms (optional)number or null
p95_ms (optional)number or null

WorkerInfo

FieldType
blocked_by (optional)number or nullThe lane whose first message it keeps retrying.
lanes_waitingnumber
waitingnumber
workernumber