Workflows
Workflows endpoints of the MedHook engine API: 93 operations with parameters, schemas and a curl example for each.
On this page
- List workflows
- Create workflow
- List workflow templates
- Get workflow
- Update workflow
- Turn a workflow on or off, or change its settings
- Delete workflow
- Execute workflow
- Get workflow publish history
- Publish workflow to marketplace
- Restore a prior version as the draft
- Read the saved sample message
- Save the sample message
- Delete the sample message
- Dry run a workflow on a message
- Fetch a sample from the workflow's source
- Preview a De-identify step on the saved sample
- Generate the webhook trigger's signing secret
- Export as a Mirth Connect channel
- Export several workflows as a Mirth server configuration or a .zip
- Export a workflow as MedHook JSON
- Import a MedHook JSON bundle
- Promote a workflow to another workspace, with a diff
- Deployment history per environment
- Roll back to the previous deployed version
- A workflow's sender settings
- Replace a workflow's sender settings
- Linked template status and update preview
- Update all linked workflows
- A workflow's releases
- Release the deployed version
- Workflows a Call workflow step can call
- Components
- Save steps as a component
- A component
- Delete a component
- Release a component
- A release's impact
- Run tests, or update selected/all consumers to a release
- List templates made of components
- Save a workflow as a template
- A template made of components
- Delete a template
- Publish a template release
- Fill in a template (New from template)
- Update the workflows made from a template
- List the sample library
- Run steps with a sample
- Replay an HL7 export or batch file
- Deploy state
- Deploy (now, as a canary or later), approve, roll back or dry-run recent messages
- List workflow versions
- Get one workflow version
- Restore a workflow version
- Run a workflow with a sample message
- Stored message encryption for a workflow
- Turn stored message encryption on or off for a workflow
- Execution retention for a workflow
- Set a workflow's execution retention
- A polling trigger's cursor state
- Poll from the beginning
- A polling workflow's recent polls
- List saved test cases
- Save a test case
- Get a test case
- Change a test case
- Delete a test case
- Run the saved test cases
- Count the values of one HL7 field
- Per-step results of the latest run
- Step latency percentiles
- Slowest step of each workflow
- Import a community template
- Preview a transform pipeline
- Make or find the checklist's practice workflow
- First-run checklist
- Hide, reopen or mark the first-run checklist
- Read an API description (New workflow)
- Mint a capture URL (New workflow)
- Wait for the captured request (SSE)
- Send the request to capture
- Workflow overview
- Workflow runs
- Workflow run detail
- A step's errors in the last 24 hours
- The last real input at a step
- A workflow's newest runs, for the builder's Input picker
- Per-step traffic over the last 24 hours
- The workflow's environment
- Set the workflow's environment
- A draft's MLLP listener
- Open an MLLP listener for a draft
- Close a draft's MLLP listener
- Schemas
Create, read, update, delete, and execute DAG-based workflows.
List workflows
get/api/workflows
Returns a cursor-paginated list of workflow definitions for the current workspace. Results are ordered by (name asc, id asc). total counts every match across pages. Rate limited: 300 req / 60 s.
Auth: Bearer token (how to get one) · Operation: listWorkflows
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | Maximum number of results to return per page. |
cursor | query | string | Opaque cursor from a previous response |
enabled | query | boolean | Filter by enabled status. |
q | query | string | Case-insensitive match on name or description. |
trigger | query | string | Comma-separated trigger types, e.g. |
stats | query | string |
|
status | query | string | The list's chips, applied server-side across pages: |
exportable | query | string |
|
Responses
- 200Paginated list of workflows.
Response fields
application/json · object
totalintegerrequiredMatching workflows across all pages.
nextCursorstring | nullrequiredPass this value as
cursorto retrieve the next page, or null if this is the last page.workflowsarray of objectrequired20 fields
idstringrequirednamestringrequireddescriptionstringenabledbooleanrequiredstartNodeIdstringrequiredtriggerobject | object | object | object | object | object | object | object | object | object | object | object | objectrequiredOne of eight supported trigger types. The
typediscriminant selects the applicable additional fields.13 fields
type: "manual"object1 field
typestringrequiredOne of: "manual"
type: "topic"objectRuns once for every event a Publish step writes to the topic (same workspace). Durable fan-out through the work table, at least once, deduplicated by event id.
2 fields
typestringrequiredOne of: "topic"
topicstringrequired
type: "webhook"object13 fields
typestringrequiredOne of: "webhook"
webhookIdstringrequiredpathstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8 (or the Content-Type charset parameter). msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
secretstringtimestampToleranceSecondsintegerReplay window: the most seconds a signed timestamp (webhook-timestamp or x-webhook-timestamp) may be from the engine's clock. Outside it the answer is 401 TIMESTAMP_OUT_OF_TOLERANCE.
requireTimestampbooleanRefuse a valid signature that carries no signed timestamp (401 TIMESTAMP_REQUIRED). Off: senders that sign the body only keep working.
expectedHeadersmap of stringbodySchemaobjectJSON Schema the body must match: type, properties, required, additionalProperties (boolean), items, enum, const, minLength, maxLength, pattern, format (date, date-time, email, uuid), minimum, maximum, minItems, maxItems; $schema, title and description are allowed and not checked; $defs at the root and $ref to
#/$defs/<name>. Other keywords are refused on save. A pasted OpenAPI requestBody (with its components) or document ({ document, operationId }) is stored converted to this subset. A body that no trigger on the webhook id accepts is 400 BODY_SCHEMA_INVALID withproblems(JSON Pointers, never values), and nothing runs.senderFromobjectWhere a JSON delivery names its sender, for the workflow's sender table ({{sender.KEY}}, per-sender connections): exactly one of
path(a dotted path into the body, e.g. organization.id) orheader(a header name). The value is matched like an HL7 message's MSH-4.2 fields
pathstringheaderstring
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "schedule"object3 fields
typestringrequiredOne of: "schedule"
cronstringrequiredCron expression; an alias of the cron trigger, run once per slot across replicas.
timezonestring
type: "cron"object3 fields
typestringrequiredOne of: "cron"
cronExpressionstringrequiredtimezonestring
type: "polling"object12 fields
typestringrequiredOne of: "polling"
intervalintegerrequiredPoll interval in milliseconds (at least 10000).
adapterProfileIdstringrequiredAdapter profile to read; must be in the workflow's workspace.
actionstringAdapter action to call. Default: search when the adapter has it (FHIR adapters, whose read is read-by-id), otherwise read.
paramsobjectAdapter params. A string value containing {{cursor}} gets the stored cursor; before the first cursor such a value is left out.
itemsPathstringDot path to the item array in the adapter result. Not needed for an array or a FHIR Bundle.
idFieldstringDot path to each item's id. With cursorField, the dedup key is the id plus its cursor value, so a later change to the same record runs again.
cursorFieldstringDot path to an ordered change marker (ISO timestamp or number). Without it, the last 5,000 ids seen are the replay guard.
cursorFormatstringHow cursorField values are written when they do not sort as text (MM/DD/YYYY). Each value is read in this format and stored as ISO-8601; {{cursor}} is sent back in it. A value that does not parse does not run. Changing it starts the cursor again.
One of: "MM/DD/YYYY", "MM/DD/YYYY HH:mm", "MM/DD/YYYY HH:mm:ss", "MM/DD/YYYY hh:mm A", "MM/DD/YYYY hh:mm:ss A", "DD/MM/YYYY", "DD/MM/YYYY HH:mm:ss", "YYYYMMDDHHmmss", "epoch-seconds", "epoch-millis"
maxItemsPerPollintegerItems one poll runs. Items sharing the last item's cursor value also run, so a group is never split.
filterobjectInbound filter ({ logic, rules, groups?, customScript? }), as on the other triggers. A polled item it rejects runs no workflow and creates no work row, but the cursor moves past it, so it is not read again.
startFromstringnow: the first poll records what already exists and runs nothing. beginning: the first poll runs every item.
One of: "now", "beginning"
type: "mllp"object13 fields
typestringrequiredOne of: "mllp"
messageTypesarray of stringrequiredsendingFacilitystringsendingAppstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8. msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
listenerstringThe MLLP listener (port) this trigger takes messages from, declared in Helm
mllp.listeners. Omitted:default(mllp.port). A save naming an undeclared listener is a 400.ackModestringaccept: AA once the message is durably recorded. respond (#751): waits like destination, then answers with the ACK the workflow's Respond step built (a custom MSA and ERR segments, or a whole ACK); with no usable Respond output, the destination-mode outcome; when the wait runs out,
ackTimeoutCode. destination: the ACK waits for the workflow's destinations: AA when every one completed, AR when one rejected it for good, AE on any other failure or when they have not finished withinackTimeoutMs. A resend of a message whose delivery failed replays it once and waits again. Not used for messages from anmsh15listener that set MSH-15.One of: "accept", "destination", "respond"
ackTimeoutMsintegerdestination and respond modes: how long the ACK waits, capped at the listener's
MLLP_TIMEOUTminus 5 s. One sender connection handles one message at a time, so a slow destination slows that sender (intended backpressure).ackTimeoutCodestringrespond mode: the ACK sent when the run has not settled within
ackTimeoutMs. AE: the sender resends (dedup absorbs it). AR: the sender gives up on the message; the recorded run still runs.One of: "AE", "AR"
ackOnFailurestringrespond mode, when a step after the Respond step fails: respond keeps the Respond step's ACK (Mirth's respond from destination); AE answers AE "Workflow failed; retry".
One of: "respond", "AE"
filteredAckstringThe ACK for a message this trigger's
filterdrops when no other workflow takes it. AR: "No matching triggers". AA: accepted, as Mirth answers for filtered messages. Either way the message is kept in Messages as Filtered, with the rule that dropped it.One of: "AR", "AA"
onErrorstringMessages always run in arrival order per sending facility (lane
<trigger>|<MSH-4>). continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.One of: "continue", "hold"
type: "fhir-subscription"object6 fields
typestringrequiredOne of: "fhir-subscription"
resourceTypestringrequiredcriteriastringinteractionstringOne of: "create", "update", "delete", "create-or-update"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger; one lane per resourceType/id). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "x12"object19 fields
typestringrequiredOne of: "x12"
transactionSetsarray of stringrequiredsourceTypestringrequiredWhich deliveries this trigger takes. The server decides a delivery's source:
webhookforPOST /api/triggers/x12with a token,uploadfor a dashboard upload,sftpfor the SFTP pickup. A sender cannot claim one.One of: "sftp", "webhook", "upload"
sftpProfileIdstringsourceType sftp: the SFTP adapter profile whose folder the engine polls for X12 files.
pollIntervalintegersourceType sftp: milliseconds between pickups.
remotePathstringsourceType sftp: the folder to pick files up from.
filenamePatternstringsourceType sftp: a glob (
*,?,[abc]) on the file name.afterProcessingstringsourceType sftp: what happens to a file once its transaction sets are recorded. A file is never run twice,
leaveincluded: the engine's record of a file does not expire while the file is in the folder, anddeduplicate: falsedoes not turn it off.One of: "move", "delete", "leave"
processedPathstringsourceType sftp: where
moveputs files (required for move).errorPathstringsourceType sftp: where a file that is not X12 goes; without it the file stays and the error is recorded.
filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, or by name.
One of: "modified", "name"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1).
One of: "utf8", "latin1"
ackPathstringsourceType sftp: where the 999 / TA1 (see acknowledgments) are written, as
<file>.999/<file>.ta1.acknowledgmentsstring999: a 999 per functional group comes back with the delivery. 999+ta1: also a TA1 when ISA14=1 or the envelope is broken. Syntax checks only (control numbers and counts, a known ST), not implementation-guide validation.
One of: "none", "999", "999+ta1"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "sftp"objectPicks files up from an SFTP folder (like a Mirth File Reader). A file is downloaded only once it is minFileAgeMs old and its listed size is at most maxFileBytes; it is moved, deleted or left only after its runs are recorded, and never runs twice.
20 fields
typestringrequiredOne of: "sftp"
sftpProfileIdstringrequiredThe SFTP adapter profile whose folder the engine polls.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "file"objectPicks files up from the folder of a file, ftp, smb, webdav, s3 or sftp adapter profile (a Mirth File Reader over any scheme, P138). Same settings and runs as the sftp trigger; triggerType is "file".
20 fields
typestringrequiredOne of: "file"
adapterProfileIdstringrequiredThe adapter profile whose folder the engine polls: its adapter type (file, ftp, smb, webdav, s3 or sftp) is the transport.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "jms"objectConsumes a JMS queue or topic over AMQP 1.0 (a Mirth JMS Listener) through a jms adapter profile. One engine replica consumes each trigger. A message is acknowledged to the broker only once its run is recorded, so a crash redelivers it, and the JMS message id dedups the redelivery. A message the filter drops is acknowledged; one that can't be recorded (license, backlog, shutdown) stays on the broker.
10 fields
typestringrequiredOne of: "jms"
adapterProfileIdstringrequiredThe jms adapter profile (broker host, login, TLS).
destinationstringrequiredQueue or topic name.
destinationTypestringOne of: "queue", "topic"
subscriptionNamestringTopics: a durable subscription under this name (the profile's clientId, else medhook-<workflowId>, is its client id), so messages sent while no engine is connected wait for it.
selectorstringA JMS message selector, applied by the broker.
prefetchintegerMessages the broker may send ahead of acknowledgement.
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
type: "soap"objectA SOAP 1.1/1.2 endpoint at /api/triggers/soap/{listenerId} with its WSDL at ?wsdl (a Mirth Web Service Listener).
15 fields
typestringrequiredOne of: "soap"
listenerIdstringrequiredserviceNamestringThe generated WSDL's service name.
namespacestringThe generated WSDL's target namespace.
soapVersionstringOne of: "1.1", "1.2", "both"
operationsarray of stringOperation (Body element) names it takes; empty takes any.
wsSecuritystringOne of: "none", "UsernameToken"
wsUsernamestringwsPasswordstringWrite-only: stored encrypted, read back as
__set__.secretstringHMAC-SHA256 key for x-webhook-signature. Write-only, read back as
__set__.wsdlstringA WSDL to serve instead of the generated one.
responseobject3 fields
modestringOne of: "accepted", "destination"
nodeIdstringtimeoutMsinteger
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
metadataobjectArbitrary workflow-level metadata.
1 field
handlesPHIbooleanWhen true the engine requires a BAA-enabled license before executing.
createdBystringcreatedAtstring (date-time)updatedAtstring (date-time)ownerstring | nullWho owns the workflow (Settings · General). Changed with PATCH; null = not set.
tagsarray of stringLowercased tags (Settings · General). Changed with PATCH.
maxInFlightinteger | nullMost runs of this workflow the work runner starts at once across replicas: queued messages and polls wait while that many run (Settings · Delivery). A manual run is not held back but counts. Changed with PATCH; null = no limit.
dedupTtlHoursintegerGET only: how long a duplicate receipt is kept (INBOUND_DEDUP_TTL_HOURS, default 24), the Duplicate messages window.
maxWorkflowRetriesinteger | nullMax times to retry the entire workflow after top-level failure. Each retry is a durable pending execution due after the backoff: it survives a restart and holds no queue slot or ordering lane while it waits. Saved with the workflow and its versions; the deployed version's value runs. null = not set (0).
workflowRetryDelayMsinteger | nullBase delay (ms) before the first workflow-level retry; doubles per attempt, capped at 30 minutes.
statsobjectWith
stats=1. The series and p95 are cached for 60 s; a new run on the page refreshes them.4 fields
last24hobject2 fields
totalintegerfailedinteger
lastRunobject | null2 fields
statusstringstartedAtstring (date-time)
hourly24array of integerRuns per hour over the last 24 h, 24 entries, oldest first; sums to
last24h.total.p95Msinteger | nullp95 run time over the last 24 h in ms; null when idle.
summaryobjectWith
stats=1.9 fields
versionintegerLive version number.
deployedVersioninteger | nullDeployed version, null before the first deploy.
destinationsarray of stringstatusstringactive · unapproved (Needs approval) · failing · waiting (Waiting for first message) · draft · paused.
One of: "active", "unapproved", "failing", "waiting", "draft", "paused"
importedFromstring | nullOne of: "mirth"
updatedBystring | nulltunnelUpboolean | nullfailingDestinationstring | nullWhen the newest run failed: the destination whose step failed in it.
reasonstringThe line under the status pill, e.g. "PACS not answering", "v3 waiting for review", "no messages yet", "review the import"; empty when none.
countsobjectWith
stats=1: chip counts over every match.7 fields
allintegeractiveintegerattentionintegerFailing, unapproved and waiting workflows.
draftintegerpausedintegermirthintegerWorkflows imported from Mirth Connect.
messages24hintegerRuns of every matching workflow in the last 24 h.
- 400Unknown trigger type or status, or q over 200 characters.
application/json · ApiError
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows" \
-H "Authorization: Bearer $TOKEN"Create workflow
post/api/workflows
Create a new workflow. The graph is validated for cycles before persistence. A new workflow is always a disabled draft: it goes live through Deploy (POST /api/workflows/{id}/deploy), so enabled: true is refused with 409 NOT_DEPLOYED; leave enabled out or send false. A webhook trigger with no webhookId (a template's gives only a path) gets a unique one, returned on the created workflow. A template from GET /api/workflows/templates can be posted as served. A workflow limit set by your license is enforced. Rate limited: 20 req / 60 s.
Auth: Bearer token (how to get one) · Operation: createWorkflow
Request body (required)
application/json · object
namestringrequireddescriptionstringenabledbooleanAlways false on create:
trueanswers 409NOT_DEPLOYED(deploy the workflow to turn it on).startNodeIdstringrequiredtriggerobject | object | object | object | object | object | object | object | object | object | object | object | objectrequiredOne of eight supported trigger types. The
typediscriminant selects the applicable additional fields.13 fields
type: "manual"object1 field
typestringrequiredOne of: "manual"
type: "topic"objectRuns once for every event a Publish step writes to the topic (same workspace). Durable fan-out through the work table, at least once, deduplicated by event id.
2 fields
typestringrequiredOne of: "topic"
topicstringrequired
type: "webhook"object13 fields
typestringrequiredOne of: "webhook"
webhookIdstringrequiredpathstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8 (or the Content-Type charset parameter). msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
secretstringtimestampToleranceSecondsintegerReplay window: the most seconds a signed timestamp (webhook-timestamp or x-webhook-timestamp) may be from the engine's clock. Outside it the answer is 401 TIMESTAMP_OUT_OF_TOLERANCE.
requireTimestampbooleanRefuse a valid signature that carries no signed timestamp (401 TIMESTAMP_REQUIRED). Off: senders that sign the body only keep working.
expectedHeadersmap of stringbodySchemaobjectJSON Schema the body must match: type, properties, required, additionalProperties (boolean), items, enum, const, minLength, maxLength, pattern, format (date, date-time, email, uuid), minimum, maximum, minItems, maxItems; $schema, title and description are allowed and not checked; $defs at the root and $ref to
#/$defs/<name>. Other keywords are refused on save. A pasted OpenAPI requestBody (with its components) or document ({ document, operationId }) is stored converted to this subset. A body that no trigger on the webhook id accepts is 400 BODY_SCHEMA_INVALID withproblems(JSON Pointers, never values), and nothing runs.senderFromobjectWhere a JSON delivery names its sender, for the workflow's sender table ({{sender.KEY}}, per-sender connections): exactly one of
path(a dotted path into the body, e.g. organization.id) orheader(a header name). The value is matched like an HL7 message's MSH-4.2 fields
pathstringheaderstring
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "schedule"object3 fields
typestringrequiredOne of: "schedule"
cronstringrequiredCron expression; an alias of the cron trigger, run once per slot across replicas.
timezonestring
type: "cron"object3 fields
typestringrequiredOne of: "cron"
cronExpressionstringrequiredtimezonestring
type: "polling"object12 fields
typestringrequiredOne of: "polling"
intervalintegerrequiredPoll interval in milliseconds (at least 10000).
adapterProfileIdstringrequiredAdapter profile to read; must be in the workflow's workspace.
actionstringAdapter action to call. Default: search when the adapter has it (FHIR adapters, whose read is read-by-id), otherwise read.
paramsobjectAdapter params. A string value containing {{cursor}} gets the stored cursor; before the first cursor such a value is left out.
itemsPathstringDot path to the item array in the adapter result. Not needed for an array or a FHIR Bundle.
idFieldstringDot path to each item's id. With cursorField, the dedup key is the id plus its cursor value, so a later change to the same record runs again.
cursorFieldstringDot path to an ordered change marker (ISO timestamp or number). Without it, the last 5,000 ids seen are the replay guard.
cursorFormatstringHow cursorField values are written when they do not sort as text (MM/DD/YYYY). Each value is read in this format and stored as ISO-8601; {{cursor}} is sent back in it. A value that does not parse does not run. Changing it starts the cursor again.
One of: "MM/DD/YYYY", "MM/DD/YYYY HH:mm", "MM/DD/YYYY HH:mm:ss", "MM/DD/YYYY hh:mm A", "MM/DD/YYYY hh:mm:ss A", "DD/MM/YYYY", "DD/MM/YYYY HH:mm:ss", "YYYYMMDDHHmmss", "epoch-seconds", "epoch-millis"
maxItemsPerPollintegerItems one poll runs. Items sharing the last item's cursor value also run, so a group is never split.
filterobjectInbound filter ({ logic, rules, groups?, customScript? }), as on the other triggers. A polled item it rejects runs no workflow and creates no work row, but the cursor moves past it, so it is not read again.
startFromstringnow: the first poll records what already exists and runs nothing. beginning: the first poll runs every item.
One of: "now", "beginning"
type: "mllp"object13 fields
typestringrequiredOne of: "mllp"
messageTypesarray of stringrequiredsendingFacilitystringsendingAppstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8. msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
listenerstringThe MLLP listener (port) this trigger takes messages from, declared in Helm
mllp.listeners. Omitted:default(mllp.port). A save naming an undeclared listener is a 400.ackModestringaccept: AA once the message is durably recorded. respond (#751): waits like destination, then answers with the ACK the workflow's Respond step built (a custom MSA and ERR segments, or a whole ACK); with no usable Respond output, the destination-mode outcome; when the wait runs out,
ackTimeoutCode. destination: the ACK waits for the workflow's destinations: AA when every one completed, AR when one rejected it for good, AE on any other failure or when they have not finished withinackTimeoutMs. A resend of a message whose delivery failed replays it once and waits again. Not used for messages from anmsh15listener that set MSH-15.One of: "accept", "destination", "respond"
ackTimeoutMsintegerdestination and respond modes: how long the ACK waits, capped at the listener's
MLLP_TIMEOUTminus 5 s. One sender connection handles one message at a time, so a slow destination slows that sender (intended backpressure).ackTimeoutCodestringrespond mode: the ACK sent when the run has not settled within
ackTimeoutMs. AE: the sender resends (dedup absorbs it). AR: the sender gives up on the message; the recorded run still runs.One of: "AE", "AR"
ackOnFailurestringrespond mode, when a step after the Respond step fails: respond keeps the Respond step's ACK (Mirth's respond from destination); AE answers AE "Workflow failed; retry".
One of: "respond", "AE"
filteredAckstringThe ACK for a message this trigger's
filterdrops when no other workflow takes it. AR: "No matching triggers". AA: accepted, as Mirth answers for filtered messages. Either way the message is kept in Messages as Filtered, with the rule that dropped it.One of: "AR", "AA"
onErrorstringMessages always run in arrival order per sending facility (lane
<trigger>|<MSH-4>). continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.One of: "continue", "hold"
type: "fhir-subscription"object6 fields
typestringrequiredOne of: "fhir-subscription"
resourceTypestringrequiredcriteriastringinteractionstringOne of: "create", "update", "delete", "create-or-update"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger; one lane per resourceType/id). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "x12"object19 fields
typestringrequiredOne of: "x12"
transactionSetsarray of stringrequiredsourceTypestringrequiredWhich deliveries this trigger takes. The server decides a delivery's source:
webhookforPOST /api/triggers/x12with a token,uploadfor a dashboard upload,sftpfor the SFTP pickup. A sender cannot claim one.One of: "sftp", "webhook", "upload"
sftpProfileIdstringsourceType sftp: the SFTP adapter profile whose folder the engine polls for X12 files.
pollIntervalintegersourceType sftp: milliseconds between pickups.
remotePathstringsourceType sftp: the folder to pick files up from.
filenamePatternstringsourceType sftp: a glob (
*,?,[abc]) on the file name.afterProcessingstringsourceType sftp: what happens to a file once its transaction sets are recorded. A file is never run twice,
leaveincluded: the engine's record of a file does not expire while the file is in the folder, anddeduplicate: falsedoes not turn it off.One of: "move", "delete", "leave"
processedPathstringsourceType sftp: where
moveputs files (required for move).errorPathstringsourceType sftp: where a file that is not X12 goes; without it the file stays and the error is recorded.
filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, or by name.
One of: "modified", "name"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1).
One of: "utf8", "latin1"
ackPathstringsourceType sftp: where the 999 / TA1 (see acknowledgments) are written, as
<file>.999/<file>.ta1.acknowledgmentsstring999: a 999 per functional group comes back with the delivery. 999+ta1: also a TA1 when ISA14=1 or the envelope is broken. Syntax checks only (control numbers and counts, a known ST), not implementation-guide validation.
One of: "none", "999", "999+ta1"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "sftp"objectPicks files up from an SFTP folder (like a Mirth File Reader). A file is downloaded only once it is minFileAgeMs old and its listed size is at most maxFileBytes; it is moved, deleted or left only after its runs are recorded, and never runs twice.
20 fields
typestringrequiredOne of: "sftp"
sftpProfileIdstringrequiredThe SFTP adapter profile whose folder the engine polls.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "file"objectPicks files up from the folder of a file, ftp, smb, webdav, s3 or sftp adapter profile (a Mirth File Reader over any scheme, P138). Same settings and runs as the sftp trigger; triggerType is "file".
20 fields
typestringrequiredOne of: "file"
adapterProfileIdstringrequiredThe adapter profile whose folder the engine polls: its adapter type (file, ftp, smb, webdav, s3 or sftp) is the transport.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "jms"objectConsumes a JMS queue or topic over AMQP 1.0 (a Mirth JMS Listener) through a jms adapter profile. One engine replica consumes each trigger. A message is acknowledged to the broker only once its run is recorded, so a crash redelivers it, and the JMS message id dedups the redelivery. A message the filter drops is acknowledged; one that can't be recorded (license, backlog, shutdown) stays on the broker.
10 fields
typestringrequiredOne of: "jms"
adapterProfileIdstringrequiredThe jms adapter profile (broker host, login, TLS).
destinationstringrequiredQueue or topic name.
destinationTypestringOne of: "queue", "topic"
subscriptionNamestringTopics: a durable subscription under this name (the profile's clientId, else medhook-<workflowId>, is its client id), so messages sent while no engine is connected wait for it.
selectorstringA JMS message selector, applied by the broker.
prefetchintegerMessages the broker may send ahead of acknowledgement.
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
type: "soap"objectA SOAP 1.1/1.2 endpoint at /api/triggers/soap/{listenerId} with its WSDL at ?wsdl (a Mirth Web Service Listener).
15 fields
typestringrequiredOne of: "soap"
listenerIdstringrequiredserviceNamestringThe generated WSDL's service name.
namespacestringThe generated WSDL's target namespace.
soapVersionstringOne of: "1.1", "1.2", "both"
operationsarray of stringOperation (Body element) names it takes; empty takes any.
wsSecuritystringOne of: "none", "UsernameToken"
wsUsernamestringwsPasswordstringWrite-only: stored encrypted, read back as
__set__.secretstringHMAC-SHA256 key for x-webhook-signature. Write-only, read back as
__set__.wsdlstringA WSDL to serve instead of the generated one.
responseobject3 fields
modestringOne of: "accepted", "destination"
nodeIdstringtimeoutMsinteger
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
metadataobjectfromAgentbooleanTrue when a person saves the Agent's workflow draft (the Agent screen's Save draft, or the builder hand-off). The workflow.created audit event then carries
proposedBy: "agent", and People counts the save as one of the Agent's changes. Never stored on the workflow.conversationTitlestringWith
fromAgentonly: the title of the Agent conversation the draft came from (its first question), for the Audit log's Agent action note. Only the title is sent; the conversation stays in the browser. It is folded onto one line, cut to 80 characters and its digit runs masked, then kept on the workflow.created audit event asconversationTitle, or dropped when it still looks like PHI (a name after a cue, an email, a phone number, a date). Never stored on the workflow.maxWorkflowRetriesintegerworkflowRetryDelayMsinteger
Responses
- 201Workflow created.
Response fields
application/json · object
- 400Request body or query parameters failed validation.
application/json · ApiError
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 403Workflow limit reached.
application/json · ApiError
- 409`NOT_DEPLOYED`: the body asked for `enabled: true`. A new workflow starts disabled and goes live through Deploy.
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"enabled": false,
"nodes": [
{
"id": "node-1",
"type": "adapter",
"label": "Fetch Patients",
"position": {
"x": 0,
"y": 0
},
"data": {
"errorHandling": {
"strategy": "retry",
"maxRetries": 3,
"retryDelay": 1000,
"backoffMultiplier": 2
},
"mapping": [
{
"source": "string",
"sources": [
"string"
],
"separator": "string",
"target": "string",
"transform": "uppercase",
"ops": [
{}
],
"default": "string",
"lookupValues": [
{
"from": "string",
"to": "string",
"note": "string"
}
],
"lookup": "string",
"onMissingCode": "fail"
}
],
"config": {
"mapMode": "new",
"onRowError": "fail",
"mappingMode": "merge",
"nextOfKin": "skip",
"messageHeader": "skip",
"fields": [
"string"
],
"onMissingCode": "fail",
"codeTables": [
"string"
],
"escape": "none",
"onMissing": "empty",
"delimiter": ",",
"recordDelimiter": "auto",
"quote": "\"",
"header": true,
"columns": [
null
],
"maxRows": 10000,
"quoteMode": "minimal",
"xpaths": {},
"stripNamespaces": true,
"stylesheet": "string",
"source": "message",
"sourceField": "string",
"sourceVariable": "string",
"resultTo": "message",
"resultField": "string",
"resultVariable": "string",
"params": [
{
"name": "string",
"value": "string"
}
]
}
}
}
],
"edges": [
{
"id": "edge-1",
"source": "node-1",
"target": "node-2",
"label": "success"
}
],
"startNodeId": "string",
"trigger": {
"type": "manual"
},
"metadata": {},
"fromAgent": true,
"conversationTitle": "string",
"maxWorkflowRetries": 0,
"workflowRetryDelayMs": 1000
}'List workflow templates
get/api/workflows/templates
Returns built-in workflow templates for common integration patterns. When source=community or source=all is supplied, the engine proxies to the medhook.dev marketplace and may be slower.
Auth: Bearer token (how to get one) · Operation: listWorkflowTemplates
Parameters
| Name | In | Type | Description |
|---|---|---|---|
id | query | string | Return a single template by ID. |
category | query | string | |
q | query | string | Free-text search over name, description, and tags. |
shape | query | string | Only templates that follow this pattern. Unknown values are a 400. |
source | query | string |
Responses
Example request
curl "$ENGINE_URL/api/workflows/templates" \
-H "Authorization: Bearer $TOKEN"Get workflow
get/api/workflows/{id}
Auth: Bearer token (how to get one) · Operation: getWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow ID. |
Responses
- 200Workflow detail.
Response fields
application/json · object
deployedVersioninteger | nullrequiredThe version production runs, or null when none was ever deployed. A newer saved version is a draft.
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/wf_abc123" \
-H "Authorization: Bearer $TOKEN"Update workflow
put/api/workflows/{id}
400 when the trigger can never fire: a cron or schedule expression that can't be scheduled or an unknown time zone (details.issues code INVALID_CRON), or a FHIR subscription resourceType that isn't a resource type name (INVALID_FHIR_RESOURCE_TYPE). These are rejected enabled or not; an empty expression or resource type only blocks an enabled save. Also 400 for an enabled workflow with a destination whose profile is missing (DESTINATION_PROFILE_MISSING) or read-only (DESTINATION_READ_ONLY), or with a per-sender connection of another adapter than the step's default (SENDER_PROFILE_TYPE_MISMATCH), or with a Component step that has a connection per sender while its component sends through more than one connection (COMPONENT_SENDS_DIFFER).
Auth: Bearer token (how to get one) · Operation: updateWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow ID. |
Request body (required)
application/json · object
namestringdescriptionstringenabledbooleannodesarray of WorkflowNodeedgesarray of WorkflowEdgestartNodeIdstringtriggerobject | object | object | object | object | object | object | object | object | object | object | object | objectOne of eight supported trigger types. The
typediscriminant selects the applicable additional fields.13 fields
type: "manual"object1 field
typestringrequiredOne of: "manual"
type: "topic"objectRuns once for every event a Publish step writes to the topic (same workspace). Durable fan-out through the work table, at least once, deduplicated by event id.
2 fields
typestringrequiredOne of: "topic"
topicstringrequired
type: "webhook"object13 fields
typestringrequiredOne of: "webhook"
webhookIdstringrequiredpathstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8 (or the Content-Type charset parameter). msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
secretstringtimestampToleranceSecondsintegerReplay window: the most seconds a signed timestamp (webhook-timestamp or x-webhook-timestamp) may be from the engine's clock. Outside it the answer is 401 TIMESTAMP_OUT_OF_TOLERANCE.
requireTimestampbooleanRefuse a valid signature that carries no signed timestamp (401 TIMESTAMP_REQUIRED). Off: senders that sign the body only keep working.
expectedHeadersmap of stringbodySchemaobjectJSON Schema the body must match: type, properties, required, additionalProperties (boolean), items, enum, const, minLength, maxLength, pattern, format (date, date-time, email, uuid), minimum, maximum, minItems, maxItems; $schema, title and description are allowed and not checked; $defs at the root and $ref to
#/$defs/<name>. Other keywords are refused on save. A pasted OpenAPI requestBody (with its components) or document ({ document, operationId }) is stored converted to this subset. A body that no trigger on the webhook id accepts is 400 BODY_SCHEMA_INVALID withproblems(JSON Pointers, never values), and nothing runs.senderFromobjectWhere a JSON delivery names its sender, for the workflow's sender table ({{sender.KEY}}, per-sender connections): exactly one of
path(a dotted path into the body, e.g. organization.id) orheader(a header name). The value is matched like an HL7 message's MSH-4.2 fields
pathstringheaderstring
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "schedule"object3 fields
typestringrequiredOne of: "schedule"
cronstringrequiredCron expression; an alias of the cron trigger, run once per slot across replicas.
timezonestring
type: "cron"object3 fields
typestringrequiredOne of: "cron"
cronExpressionstringrequiredtimezonestring
type: "polling"object12 fields
typestringrequiredOne of: "polling"
intervalintegerrequiredPoll interval in milliseconds (at least 10000).
adapterProfileIdstringrequiredAdapter profile to read; must be in the workflow's workspace.
actionstringAdapter action to call. Default: search when the adapter has it (FHIR adapters, whose read is read-by-id), otherwise read.
paramsobjectAdapter params. A string value containing {{cursor}} gets the stored cursor; before the first cursor such a value is left out.
itemsPathstringDot path to the item array in the adapter result. Not needed for an array or a FHIR Bundle.
idFieldstringDot path to each item's id. With cursorField, the dedup key is the id plus its cursor value, so a later change to the same record runs again.
cursorFieldstringDot path to an ordered change marker (ISO timestamp or number). Without it, the last 5,000 ids seen are the replay guard.
cursorFormatstringHow cursorField values are written when they do not sort as text (MM/DD/YYYY). Each value is read in this format and stored as ISO-8601; {{cursor}} is sent back in it. A value that does not parse does not run. Changing it starts the cursor again.
One of: "MM/DD/YYYY", "MM/DD/YYYY HH:mm", "MM/DD/YYYY HH:mm:ss", "MM/DD/YYYY hh:mm A", "MM/DD/YYYY hh:mm:ss A", "DD/MM/YYYY", "DD/MM/YYYY HH:mm:ss", "YYYYMMDDHHmmss", "epoch-seconds", "epoch-millis"
maxItemsPerPollintegerItems one poll runs. Items sharing the last item's cursor value also run, so a group is never split.
filterobjectInbound filter ({ logic, rules, groups?, customScript? }), as on the other triggers. A polled item it rejects runs no workflow and creates no work row, but the cursor moves past it, so it is not read again.
startFromstringnow: the first poll records what already exists and runs nothing. beginning: the first poll runs every item.
One of: "now", "beginning"
type: "mllp"object13 fields
typestringrequiredOne of: "mllp"
messageTypesarray of stringrequiredsendingFacilitystringsendingAppstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8. msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
listenerstringThe MLLP listener (port) this trigger takes messages from, declared in Helm
mllp.listeners. Omitted:default(mllp.port). A save naming an undeclared listener is a 400.ackModestringaccept: AA once the message is durably recorded. respond (#751): waits like destination, then answers with the ACK the workflow's Respond step built (a custom MSA and ERR segments, or a whole ACK); with no usable Respond output, the destination-mode outcome; when the wait runs out,
ackTimeoutCode. destination: the ACK waits for the workflow's destinations: AA when every one completed, AR when one rejected it for good, AE on any other failure or when they have not finished withinackTimeoutMs. A resend of a message whose delivery failed replays it once and waits again. Not used for messages from anmsh15listener that set MSH-15.One of: "accept", "destination", "respond"
ackTimeoutMsintegerdestination and respond modes: how long the ACK waits, capped at the listener's
MLLP_TIMEOUTminus 5 s. One sender connection handles one message at a time, so a slow destination slows that sender (intended backpressure).ackTimeoutCodestringrespond mode: the ACK sent when the run has not settled within
ackTimeoutMs. AE: the sender resends (dedup absorbs it). AR: the sender gives up on the message; the recorded run still runs.One of: "AE", "AR"
ackOnFailurestringrespond mode, when a step after the Respond step fails: respond keeps the Respond step's ACK (Mirth's respond from destination); AE answers AE "Workflow failed; retry".
One of: "respond", "AE"
filteredAckstringThe ACK for a message this trigger's
filterdrops when no other workflow takes it. AR: "No matching triggers". AA: accepted, as Mirth answers for filtered messages. Either way the message is kept in Messages as Filtered, with the rule that dropped it.One of: "AR", "AA"
onErrorstringMessages always run in arrival order per sending facility (lane
<trigger>|<MSH-4>). continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.One of: "continue", "hold"
type: "fhir-subscription"object6 fields
typestringrequiredOne of: "fhir-subscription"
resourceTypestringrequiredcriteriastringinteractionstringOne of: "create", "update", "delete", "create-or-update"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger; one lane per resourceType/id). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "x12"object19 fields
typestringrequiredOne of: "x12"
transactionSetsarray of stringrequiredsourceTypestringrequiredWhich deliveries this trigger takes. The server decides a delivery's source:
webhookforPOST /api/triggers/x12with a token,uploadfor a dashboard upload,sftpfor the SFTP pickup. A sender cannot claim one.One of: "sftp", "webhook", "upload"
sftpProfileIdstringsourceType sftp: the SFTP adapter profile whose folder the engine polls for X12 files.
pollIntervalintegersourceType sftp: milliseconds between pickups.
remotePathstringsourceType sftp: the folder to pick files up from.
filenamePatternstringsourceType sftp: a glob (
*,?,[abc]) on the file name.afterProcessingstringsourceType sftp: what happens to a file once its transaction sets are recorded. A file is never run twice,
leaveincluded: the engine's record of a file does not expire while the file is in the folder, anddeduplicate: falsedoes not turn it off.One of: "move", "delete", "leave"
processedPathstringsourceType sftp: where
moveputs files (required for move).errorPathstringsourceType sftp: where a file that is not X12 goes; without it the file stays and the error is recorded.
filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, or by name.
One of: "modified", "name"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1).
One of: "utf8", "latin1"
ackPathstringsourceType sftp: where the 999 / TA1 (see acknowledgments) are written, as
<file>.999/<file>.ta1.acknowledgmentsstring999: a 999 per functional group comes back with the delivery. 999+ta1: also a TA1 when ISA14=1 or the envelope is broken. Syntax checks only (control numbers and counts, a known ST), not implementation-guide validation.
One of: "none", "999", "999+ta1"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "sftp"objectPicks files up from an SFTP folder (like a Mirth File Reader). A file is downloaded only once it is minFileAgeMs old and its listed size is at most maxFileBytes; it is moved, deleted or left only after its runs are recorded, and never runs twice.
20 fields
typestringrequiredOne of: "sftp"
sftpProfileIdstringrequiredThe SFTP adapter profile whose folder the engine polls.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "file"objectPicks files up from the folder of a file, ftp, smb, webdav, s3 or sftp adapter profile (a Mirth File Reader over any scheme, P138). Same settings and runs as the sftp trigger; triggerType is "file".
20 fields
typestringrequiredOne of: "file"
adapterProfileIdstringrequiredThe adapter profile whose folder the engine polls: its adapter type (file, ftp, smb, webdav, s3 or sftp) is the transport.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "jms"objectConsumes a JMS queue or topic over AMQP 1.0 (a Mirth JMS Listener) through a jms adapter profile. One engine replica consumes each trigger. A message is acknowledged to the broker only once its run is recorded, so a crash redelivers it, and the JMS message id dedups the redelivery. A message the filter drops is acknowledged; one that can't be recorded (license, backlog, shutdown) stays on the broker.
10 fields
typestringrequiredOne of: "jms"
adapterProfileIdstringrequiredThe jms adapter profile (broker host, login, TLS).
destinationstringrequiredQueue or topic name.
destinationTypestringOne of: "queue", "topic"
subscriptionNamestringTopics: a durable subscription under this name (the profile's clientId, else medhook-<workflowId>, is its client id), so messages sent while no engine is connected wait for it.
selectorstringA JMS message selector, applied by the broker.
prefetchintegerMessages the broker may send ahead of acknowledgement.
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
type: "soap"objectA SOAP 1.1/1.2 endpoint at /api/triggers/soap/{listenerId} with its WSDL at ?wsdl (a Mirth Web Service Listener).
15 fields
typestringrequiredOne of: "soap"
listenerIdstringrequiredserviceNamestringThe generated WSDL's service name.
namespacestringThe generated WSDL's target namespace.
soapVersionstringOne of: "1.1", "1.2", "both"
operationsarray of stringOperation (Body element) names it takes; empty takes any.
wsSecuritystringOne of: "none", "UsernameToken"
wsUsernamestringwsPasswordstringWrite-only: stored encrypted, read back as
__set__.secretstringHMAC-SHA256 key for x-webhook-signature. Write-only, read back as
__set__.wsdlstringA WSDL to serve instead of the generated one.
responseobject3 fields
modestringOne of: "accepted", "destination"
nodeIdstringtimeoutMsinteger
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
metadataobjectchangeNotestring | nullWhat this save changed, shown in Versions instead of the generated summary. Kept with the version the save makes; a save that changes nothing keeps the note it had.
maxWorkflowRetriesintegerworkflowRetryDelayMsinteger
Responses
- 200Workflow updated.
Response fields
application/json · object
- 400Request body or query parameters failed validation.
application/json · ApiError
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/workflows/wf_abc123" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"enabled": true,
"nodes": [
{
"id": "node-1",
"type": "adapter",
"label": "Fetch Patients",
"position": {
"x": 0,
"y": 0
},
"data": {
"errorHandling": {
"strategy": "retry",
"maxRetries": 3,
"retryDelay": 1000,
"backoffMultiplier": 2
},
"mapping": [
{
"source": "string",
"sources": [
"string"
],
"separator": "string",
"target": "string",
"transform": "uppercase",
"ops": [
{}
],
"default": "string",
"lookupValues": [
{
"from": "string",
"to": "string",
"note": "string"
}
],
"lookup": "string",
"onMissingCode": "fail"
}
],
"config": {
"mapMode": "new",
"onRowError": "fail",
"mappingMode": "merge",
"nextOfKin": "skip",
"messageHeader": "skip",
"fields": [
"string"
],
"onMissingCode": "fail",
"codeTables": [
"string"
],
"escape": "none",
"onMissing": "empty",
"delimiter": ",",
"recordDelimiter": "auto",
"quote": "\"",
"header": true,
"columns": [
null
],
"maxRows": 10000,
"quoteMode": "minimal",
"xpaths": {},
"stripNamespaces": true,
"stylesheet": "string",
"source": "message",
"sourceField": "string",
"sourceVariable": "string",
"resultTo": "message",
"resultField": "string",
"resultVariable": "string",
"params": [
{
"name": "string",
"value": "string"
}
]
}
}
}
],
"edges": [
{
"id": "edge-1",
"source": "node-1",
"target": "node-2",
"label": "success"
}
],
"startNodeId": "string",
"trigger": {
"type": "manual"
},
"metadata": {},
"changeNote": "string",
"maxWorkflowRetries": 0,
"workflowRetryDelayMs": 1000
}'Turn a workflow on or off, or change its settings
patch/api/workflows/{id}
{ enabled } turns the workflow on or off (audited as workflow.enabled or workflow.disabled). A body with owner, tags or maxInFlight (the Settings tab's General and Delivery fields, without enabled) saves those instead: owner up to 120 characters, null clears it; tags up to 10, each 1 to 32 characters, lowercased with repeats dropped; maxInFlight a whole number from 1 to 64, null for no limit: the work runner starts the workflow's queued runs (webhook, MLLP, X12, FHIR, file and other intake, retries, replays) and its polls only while fewer than that many of its runs are running, across replicas, holding the rest as pending without holding up other workflows. A manual run (POST /api/workflows/:id/execute) is not held back but counts while it runs. A change is audited as workflow.updated with changed, the keys whose value differs, and their new values; an unchanged save writes and audits nothing. Either way it does not touch the definition and records no version. Ordering and Duplicate messages are the trigger's config: they change with the workflow save (PUT).
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: setWorkflowEnabled
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
enabledbooleanownerstring | nullWho owns the workflow (an email or a name).
tagsarray of stringmaxInFlightinteger | nullMost runs at once; null = no limit.
Responses
- 200Updated.
Response fields
application/json · object
workflowWorkflow
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PATCH "$ENGINE_URL/api/workflows/<id>" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"owner": "string",
"tags": [
"string"
],
"maxInFlight": 1
}'Delete workflow
delete/api/workflows/{id}
Auth: Bearer token (how to get one) · Operation: deleteWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow ID. |
Responses
- 200Workflow deleted.
Response fields
application/json · object
successbooleanrequireddeletedAtstring (date-time)
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X DELETE "$ENGINE_URL/api/workflows/wf_abc123" \
-H "Authorization: Bearer $TOKEN"Execute workflow
post/api/workflows/{id}/execute
Manually trigger a workflow execution. The call is synchronous: it runs the deployed version and answers when the run ends, with its status and each step's result in execution.nodeResults (a long run holds the request open, up to the workflow timeout WORKFLOW_TIMEOUT_MS, 30 minutes by default). A failed run is still a 200: read execution.status. Errors are { error, code }: 404 NOT_FOUND when the workflow is not in the caller's workspace, 403 WORKFLOW_DISABLED when it is not deployed or is turned off, 500 INTERNAL_ERROR (the cause is in the engine log, never in the answer). It takes a slot of the replica's execution queue (MAX_CONCURRENT_WORKFLOWS, shared by every run on the replica): when none frees up within 60 s the answer is 429. While the replica shuts down it starts nothing and answers 503 SHUTTING_DOWN; retry and another replica runs it. If the execution history row cannot be written, the run does not start and the answer is 503 HISTORY_UNAVAILABLE: nothing was sent.
Auth: Bearer token (how to get one) · Operation: executeWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow ID. |
Request body
application/json · object
inputobjectOptional input payload available to nodes as
$.input.
Responses
- 200The run ended: `execution.status` is `completed`, `partial` or `failed`, and `execution.nodeResults` holds each step's result by step id.
Response fields
application/json · object
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 403`code: WORKFLOW_DISABLED` when the workflow is not deployed or is turned off. Also answered without a valid license, and for a PHI workflow on a license without the PHI claim.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
- 503The replica is shutting down (`code: SHUTTING_DOWN`; retry after `Retry-After` seconds), or the execution history row could not be written (`code: HISTORY_UNAVAILABLE`; check Postgres, then retry). Either way nothing was started.
Response fields
application/json · object
errorstringcodestringOne of: "SHUTTING_DOWN", "HISTORY_UNAVAILABLE"
messagestring
Example request
curl -X POST "$ENGINE_URL/api/workflows/wf_abc123/execute" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": {}
}'Get workflow publish history
get/api/workflows/{id}/publish
Returns the last 5 local publish records for the workflow.
Auth: Bearer token (how to get one) · Operation: getWorkflowPublishHistory
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow ID. |
Responses
- 200Publish history.
Response fields
application/json · object
publishesarray of objectrequired7 fields
idstringversionstringchangelogstringpublishedAtstring (date-time)engineIdstringmarketplaceTemplateIdstringstatusstringOne of: "succeeded", "failed"
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/wf_abc123/publish" \
-H "Authorization: Bearer $TOKEN"Publish workflow to marketplace
post/api/workflows/{id}/publish
Snapshot and publish the workflow to the medhook.dev community template marketplace. The outbound request is HMAC-SHA256 signed with ANALYTICS_WEBHOOK_SECRET. No PHI leaves: the saved sample and test cases never travel, text copied from a real message is replaced by [redacted] (in the workflow and the changelog), and report says what was left out. Rate limited: 5 req / 60 s.
Auth: Bearer token (how to get one) · Operation: publishWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow ID. |
Request body (required)
application/json · object
versionstringrequiredSemver string.
changelogstring
Responses
- 200Workflow published.
Response fields
application/json · object
publishedbooleanrequiredreportarray of stringWhat was left out because it came from a real message.
versionstringrequiredengineIdstringmarketplaceResponseobject2 fields
templateIdstringslugstring
- 400Request body or query parameters failed validation.
application/json · ApiError
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
- 502Marketplace upstream returned a non-2xx. Local audit row is still written.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/wf_abc123/publish" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"version": "1.2.0",
"changelog": "Added X12 837 routing branch"
}'Restore a prior version as the draft
post/api/workflows/{id}/rollback
Restores the draft; production keeps running the deployed version until deployed. To restore and deploy in one step use POST /api/workflows/{id}/deploy with action: "rollback". Reverts the live workflow definition to the state captured in a previous WorkflowVersion snapshot. The operation is atomic: the current live state is first snapshotted (making the rollback itself undoable), the workflow definition is overwritten with the target version's nodes/edges/trigger, and a compliance audit log entry is written — all in a single database transaction. Active executions are NOT cancelled; they continue against the version they were started under. After the commit, trigger routes and cron schedules are refreshed, because a workflow that has never been deployed runs the live definition. Rate limited: 10 req / 60 s.
Auth: Bearer token (how to get one) · Operation: rollbackWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow ID. |
Request body (required)
application/json · object
versionIdstringrequiredID of the WorkflowVersion to restore. Must belong to the workflow identified by
:id.reasonstringOptional human-readable reason for the rollback. Included in the audit log.
Responses
- 200Workflow successfully rolled back.
Response fields
application/json · object
The updated live workflow definition.
fromVersionintegerrequiredVersion number of the snapshot that was restored.
toVersionintegerrequiredVersion number of the snapshot that was restored (same as fromVersion).
newVersionintegerrequiredVersion number of the newly created pre-rollback snapshot (the state that was live before this rollback, now archived and restorable).
deployedbooleanAlways false: this call restores the draft and never deploys.
runtimeVersioninteger | nullThe deployed version production keeps running, or null if the workflow has never been deployed (it then runs the restored definition).
- 400Request body or query parameters failed validation.
application/json · ApiError
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/wf_abc123/rollback" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"versionId": "clxyz1234abcdef",
"reason": "Yesterday'\''s deploy broke ADT message routing"
}'Read the saved sample message
get/api/workflows/{id}/sample
Decrypts and returns the workflow's sample message. Audited (workflow.sample_read, without content). Viewers get { hasSample, format, bytes, redacted: true } instead: that a sample exists, never its content (G32). With phi=reveal&reason= (the builder Data Map's Show PHI, which masks the sample until then) the read is audited twice, as workflow.sample_read and phi.revealed, the latter with the reason and the patient's keyed hash; a viewer's reveal is 403 PHI_REVEAL_FORBIDDEN, a missing or unknown reason 400, and a reveal that can't be recorded serves nothing (500 PHI_REVEAL_NOT_RECORDED). With view=masked (the builder's read) an operator gets { message, format, phiMasked: true, cursorDates }, the sample with the display masks applied and its structure kept, and cursorDates: each JSON path whose value is a slashed date that does not sort as text (such as 12/31/2026 23:59:59), arrays read through their first item (0), to its layout: slash-date, slash-date-hhmm, slash-date-hhmmss, slash-date-hhmm-12h or slash-date-hhmmss-12h, decided from the layout alone (nothing read from a day, month or time, so samples whose dates differ only in their values answer the same), for the builder's Cursor format hint; audited as workflow.sample_read with masked: true; a reveal wins over it, and any other view is a 400. Without view the answer is unchanged; a signed-in person's raw read also writes message.viewed with the patient's keyed hash and raw: true, while an API client's read writes only workflow.sample_read. Cache-Control: no-store. Rate limited: 60 req / 60 s.
Auth: Bearer token (how to get one) · Operation: getWorkflowSample
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
view | query | string |
|
phi | query | string |
|
reason | query | string | Why PHI is shown, with |
grant | query | string | With |
Responses
- 200The sample.
Response fields
application/json · object
messagestringformatstring | nullOne of: "hl7v2", "json"
phiMaskedbooleanTrue when
messageis masked (view=masked).cursorDatesmap of stringWith
view=masked: JSON path to the layout of each slashed date that does not sort as text. Decided from the layout alone, never from a value.
- 403PHI_REVEAL_FORBIDDEN: a viewer's reveal.
application/json · ApiError
- 404Workflow not found, or no sample saved.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/sample" \
-H "Authorization: Bearer $TOKEN"Save the sample message
put/api/workflows/{id}/sample
Stores one sample per workflow, AES-256-GCM encrypted. Must be HL7v2 (starting with MSH) or a JSON object, at most 1 MB. Send message, or captureId to save the raw body of a request captured for the New workflow wizard (only the person who minted the capture, in its workspace; 404 otherwise, and once 15 minutes have passed since the captured request arrived). Audited (workflow.sample_saved, with from: "capture" and the captureId for a capture). A capture is not consumed: it can be saved again within those 15 minutes. Rate limited: 20 req / 60 s.
Auth: Bearer token (how to get one) · Operation: putWorkflowSample
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Request body (required)
application/json · object | object
Responses
- 200Saved.
Response fields
application/json · object
hasSamplebooleanOne of: true
formatstringOne of: "hl7v2", "json"
bytesintegerreplacedbooleanA previous sample was overwritten.
- 400Missing, too large, or not HL7v2/JSON.
application/json · ApiError
- 404Workflow not found, or the capture is unknown, expired or not yours.
application/json · ApiError
- 409ifNone was set and the workflow already has a sample.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/workflows/<id>/sample" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "string",
"ifNone": true
}'Delete the sample message
delete/api/workflows/{id}/sample
Audited (workflow.sample_deleted). Rate limited: 20 req / 60 s.
Auth: Bearer token (how to get one) · Operation: deleteWorkflowSample
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Responses
- 200Deleted.
Response fields
application/json · object
hasSamplebooleanOne of: false
- 404Workflow not found in this workspace.
application/json · ApiError
Example request
curl -X DELETE "$ENGINE_URL/api/workflows/<id>/sample" \
-H "Authorization: Bearer $TOKEN"Dry run a workflow on a message
post/api/workflows/{id}/dry-run
Runs the posted message (or, with an empty body, the saved sample) through the trigger's matching rules and then every step, with no side effects: adapters report what they would send and nothing is stored, retried or counted. The response is no-store; the audit entry (workflow.dry_run) records only the outcome. The steps' data, errors and warnings come back masked (phiMasked: true; HL7 field rules, PHI paths and PHI-shaped values) unless phi=reveal&reason= is given: that is audited as phi.revealed (the reason, the patient's keyed hash, part: "run", never a value) before the run; a viewer's reveal is 403 PHI_REVEAL_FORBIDDEN, an unknown reason 400, and a reveal that can't be recorded runs nothing (500 PHI_REVEAL_NOT_RECORDED). A bundled synthetic sample comes back as is. The message is HL7v2 (MSH), JSON, raw X12 (ISA) for an X12 trigger, or any text (CSV, X12, a flat file) for an SFTP or file trigger, wrapped as a live run of that trigger wraps it ({ file, content }, or the first row in rows mode); anything else is a 400. Every adapter step is simulated, except an action its adapter declares side-effect free (a CDA or X12 parse), which runs: a read step (search, read, query, list, get, download) returns one synthetic stand-in record shaped as its result, so the steps after it run (a FHIR search: a searchset Bundle of one resource of the searched type, id dry-run-1, meta.tag code dry-run, an obviously synthetic name; a query: one row of the selected columns valued dry-run; anything else { id: "dry-run-1" }), marked synthetic: true, its step output carries simulatedRead: true, and simulatedReads lists those steps ({ nodeId, nodeName }), so a pass does not prove the reads. A step with no connection chosen previews (needsConnection: true) with a warning instead of failing, and a would-send payload that fails validation completes with a warning in the step's warnings. Step data is what a live run would store (JSON: no undefined values). Rate limited: 20 req / 60 s.
Auth: Bearer token (how to get one) · Operation: dryRunWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
phi | query | string |
|
reason | query | string | Why PHI is shown, with |
grant | query | string | With |
Request body
application/json · object
messagestring | object | array of anyThe message: HL7v2 or JSON text, or a JSON object or array (run as its JSON text, up to 1,000,000 characters). A webhook workflow's steps get a JSON message as the live record's
data.3 fields
option 1stringoption 2objectoption 3array of any
ifNonebooleanOnly save when the workflow has no sample yet; 409 otherwise.
Responses
- 200Dry run result.
application/json · DryRunResult
- 400Invalid body, no message and no saved sample, or not HL7v2/JSON.
application/json · ApiError
- 403PHI_REVEAL_FORBIDDEN: a viewer's reveal.
application/json · ApiError
- 404Workflow not found in this workspace.
application/json · ApiError
- 500PHI_REVEAL_NOT_RECORDED: the reveal couldn't be recorded; nothing ran.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/dry-run" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "string",
"ifNone": true
}'Fetch a sample from the workflow's source
post/api/workflows/{id}/sample/fetch
On a polling trigger, or a workflow whose first step is an adapter read, runs that read once, live and read-only, through the live poll's own read and item split (no cursor yet, so {{cursor}} params are left out; the source's post-process never runs), and answers the first item with the item count and where the items were (itemsPath: the trigger's itemsPath, the top-level array, Bundle.entry or items). graph is the editor's unsaved state, so it works before a save. Nothing is saved: save the item through PUT .../sample. The connection must be in the caller's workspace (404 otherwise); its calls-per-second limit costs one token; the adapter's SSRF checks apply; the read stops after 15 s (504). An adapter error is a 502 with credentials and upstream bodies removed. 400 NOT_A_READ for any other workflow, an action that sends, or SQL that isn't a SELECT. 403 SAMPLE_FETCH_DISABLED when the engine sets SAMPLE_FETCH_ENABLED=false, and 403 for a caller who may not view message content. Audited as workflow.sample_fetched (source, connection id, item count, outcome; never content). Cache-Control: no-store. Operators. Rate limited: 10 req / 60 s.
Auth: Bearer token (how to get one) · Operation: fetchWorkflowSample
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Request body
application/json · object
graphobjectThe builder's unsaved { trigger, nodes, edges, startNodeId }, validated as for test-steps.
Responses
- 200The first item (null when the source returned none).
Response fields
application/json · object
itemany | nullitemCountintegeritemsPathstring | nullsourceobject3 fields
kindstringOne of: "trigger", "step"
nodeIdstringadapterProfileIdstring
- 400NOT_A_READ: not a polling trigger or adapter read.
application/json · ApiError
- 403SAMPLE_FETCH_DISABLED, or no permission to view message content.
application/json · ApiError
- 404Workflow, or the read's connection, not found in this workspace.
application/json · ApiError
- 502SAMPLE_FETCH_FAILED: the adapter's error, redacted.
application/json · ApiError
- 504SAMPLE_FETCH_TIMEOUT: the read took over 15 s.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/sample/fetch" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"graph": {}
}'Preview a De-identify step on the saved sample
post/api/workflows/{id}/deidentify-preview
Runs the saved sample through a deidentify transform with config (unsaved settings, checked as at save) on the server, with the workspace's pseudonym key, and answers the de-identified output only. Every preset or override field an action keeps shows as [kept], never its value; fields neither covers come back as sent, so the caller needs permission to view message content (403). 422 KEY_REQUIRED when the step needs the key variable and it is missing, not secret or shorter than 16 characters; 422 when the sample is not in the step's format. Audited as workflow.deidentify_previewed (format and counts per action, never content). Cache-Control: no-store. Operators. Rate limited: 30 req / 60 s.
Auth: Bearer token (how to get one) · Operation: previewWorkflowDeidentify
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Request body
application/json · object
configobjectThe step's settings: preset, format, dates, shiftDays, freeText, zSegments, overrides, keyVariable, maskWith, patientKeyPath.
Responses
- 200The de-identified sample.
Response fields
application/json · object
formatstringOne of: "hl7v2", "fhir", "json"
outputstringcountsmap of integerHow many values each action touched.
warningsarray of string
- 400Settings that cannot run.
application/json · ApiError
- 403No permission to view message content.
application/json · ApiError
- 404Workflow not found, or no sample saved.
application/json · ApiError
- 422KEY_REQUIRED, or a sample the step cannot read.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/deidentify-preview" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"config": {}
}'Generate the webhook trigger's signing secret
post/api/workflows/{id}/webhook-secret
Generates a random HMAC-SHA256 signing secret for the workflow's webhook trigger and returns it once (Cache-Control: no-store); the trigger stores it sealed and reads show __set__. Callers sign the raw body and send it in x-hub-signature-256 (sha256=<hex>, or x-webhook-signature). Calling it again replaces the secret. A deployed workflow runs its deployed version's trigger, so a new secret takes effect at the next deploy (note says so). Without a secret or an API client every call to the webhook is 401 SIGNATURE_REQUIRED. Audited as workflow.webhook_secret_generated { webhookId, rotated }, never the value. 400 when the trigger is not a webhook. Operators. Rate limited: 10 req / 60 s.
Auth: Bearer token (how to get one) · Operation: generateWebhookSecret
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Responses
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/webhook-secret" \
-H "Authorization: Bearer $TOKEN"Export as a Mirth Connect channel
get/api/workflows/{id}/export/mirth
The workflow as a Mirth Connect channel (parallel run or rollback) and a fidelity report: every element that doesn't map exactly, in plain words. Verified in CI by importing and deploying every built-in template in Open Integration Engine 4.5.2, and running a message through each channel template; 3.12.0 output is verified through OIE 4.5.2's import migration, not a real Mirth 3.12. A workflow imported from Mirth keeps its original channel id. Adapter profiles are read from the caller's workspace only. Credentials in adapter profiles and headers are never exported; the report flags anything else that looks like one. No PHI: text copied from the saved sample or a test case from a real message (HL7 v2, X12, CDA or FHIR patient fields, in any case) is replaced by [redacted] in the workflow and its code tables before the XML is written (ids, ports and element names are never touched), and the report says how many test cases from real messages were left out (Mirth has no test cases). Audited as workflow.exported with counts only. Rate limited: 30 req / 60 s.
Auth: Bearer token (how to get one) · Operation: exportWorkflowMirth
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
version | query | string | Mirth version to write ( |
format | query | string |
|
Responses
- 200Channel XML (`attachment; filename=<sanitized name>.mirth.xml`; `X-Export-Warnings` = report entries), or the JSON form.
application/xml · string
Response fields
application/json · object
versionstringfilenamestringchannelIdstringxmlstringreportarray of object3 fields
elementstringkindstringOne of: "approximated", "not-exported", "credential-placeholder", "medhook-only-api", "disabled", "needs-setup"
messagestring
- 400Unsupported `version` or `format`.
application/json · ApiError
- 404Workflow not found in this workspace.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/export/mirth" \
-H "Authorization: Bearer $TOKEN"Export several workflows as a Mirth server configuration or a .zip
post/api/workflows/export/mirth
Workflows of the caller's workspace as one Mirth <serverConfiguration> in a "MedHook export" channel group; each MLLP / HTTP listener gets its own port and no two channels share an id. Any id outside the workspace is a 404 and nothing is exported. Restoring it in Mirth replaces the whole server configuration (the report says so). Same version / format query as the single export. Verified in CI in Open Integration Engine 4.5.2 by importing its channels one at a time (a Channel Writer reaches its sibling channel); restoring the whole file is not verified. No PHI: text copied from the saved sample or a test case from a real message (HL7 v2, X12, CDA or FHIR patient fields, in any case) is replaced by [redacted] in the workflow and its code tables before the XML is written (ids, ports and element names are never touched), and the report says how many test cases from real messages were left out (Mirth has no test cases). Audited as workflow.exported with counts only. Rate limited: 10 req / 60 s.
format=zip (Migration › Export to Mirth), stripped the same way: one channel XML per workflow under channels/, the shared libraries their steps pin (caller's workspace only) as Mirth code template libraries under code-templates/, enabled for the channels that pin them (includeCodeTemplates), and a README.md listing the credentials and settings to enter in Mirth, never their values (includeReadme). Audited as workflow.exported with format: "zip", codeTemplates and readme. format=report: what that zip would hold, with each channel's fidelity report and step count, the code templates, and pinned (every library the workflows pin, carried or not, with the workflows that pin it), and no XML; not audited (nothing leaves the engine), rate limited separately at 60 req / 60 s (the tab plans the selection again as it changes).
Auth: Bearer token (how to get one) · Operation: exportWorkflowsMirth
Parameters
| Name | In | Type | Description |
|---|---|---|---|
version | query | string | Mirth version to write ( |
format | query | string |
|
includeCodeTemplates | query | boolean |
|
includeReadme | query | boolean |
|
Request body (required)
application/json · object
idsarray of stringrequired
Responses
- 200`medhook-channels.mirth.xml`; `medhook-mirth-4.5-export.zip` / `medhook-mirth-3.12-export.zip` (headers `X-Export-Channels`, `X-Export-Code-Templates`, `X-Export-Warnings`); or JSON: `{ version, filename, xml, report, channels }` for `json`, `{ version, filename, report, channels: [{ workflowId, name, channelId, steps, report }], codeTemplates: [{ name, functions }], pinned: [{ name, functions, workflowIds }] }` for `report`.
application/xml · string
application/zip · string (binary)
Response fields
application/json · object
versionstringfilenamestringxmlstringreportarray of object3 fields
elementstringkindstringOne of: "approximated", "not-exported", "credential-placeholder", "medhook-only-api", "disabled", "needs-setup"
messagestring
channelsarray of object4 fields
workflowIdstringnamestringchannelIdstringreportarray of object3 fields
elementstringkindstringOne of: "approximated", "not-exported", "credential-placeholder", "medhook-only-api", "disabled", "needs-setup"
messagestring
- 400Bad body, `version`, `format`, `includeCodeTemplates` or `includeReadme`.
application/json · ApiError
- 404Workflow not found in this workspace.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/export/mirth" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"ids": [
"string"
]
}'Export a workflow as MedHook JSON
get/api/workflows/{id}/export
Downloads the saved workflow as a bundle (version: 2.0, Content-Disposition: attachment): the code tables it uses (with entries), its mapping sets (never sampleData, which can hold PHI) and references to its adapter profiles (id, name and type; never config, hosts or secrets). Everything is read from the caller's workspace only. Trigger secrets are the __set__ marker. No PHI: the saved sample and test cases from real messages are left out (test cases on a bundled synthetic sample travel by reference in dependencies.testCases), and text copied from such a message (HL7 v2, X12, CDA or FHIR patient fields, in any case) is replaced by [redacted] in the workflow, mapping sets, code-table entries and profile names; metadata.report and the X-Export-Left-Out / X-Export-Values-Removed / X-Export-Unchecked headers give the counts (X-Export-Unchecked: real messages in a format that could not be read, such as plain text). An import of the bundle as a new workflow saves its testCases. Audited as workflow.exported with format: medhook-json and counts only. Rate limited: 30 req / 60 s.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: exportWorkflowBundle
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Responses
- 200The bundle.
Response fields
application/json · object
versionstringrequired1.0(workflow only) or2.0(with dependencies).One of: "1.0", "2.0"
exportedAtstring (date-time)workflowobjectrequiredThe workflow graph. Trigger secrets are the
__set__marker.dependenciesobject4 fields
codeTablesarray of object2 fields
namestringentriesobject
mappingSetsarray of object5 fields
namestringsourceFormatstringtargetFormatstringmappingsarray of objectaiGeneratedboolean
adapterProfilesarray of object3 fields
refstringrequiredThe profile's id in the source workspace.
namestringrequiredadapterTypestringrequired
testCasesarray of object5 fields
namestringrequiredsamplestringrequiredA bundled synthetic sample, never message text.
One of: "adt-a01", "siu-s12"
stepIdsarray of stringstartAtstringOne of: "message", "step-input"
expectedobject
metadataobjectreport: what was left out because it came from a real message.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/export" \
-H "Authorization: Bearer $TOKEN"Import a MedHook JSON bundle
post/api/workflows/import
Imports a bundle (v1.0 or v2.0) into the caller's workspace in one transaction. Code tables: a missing one is created, an equal one reused, a differing one kept with a warning unless overwriteCodeTables. Adapter profiles: profileMap[ref], else the unique profile with the same name and type, else unresolved (the source id stays and Deploy refuses that destination). The workflow gets a new id and is turned off; trigger secrets are dropped and must be set again (a sealed enc:v1: value is a 422), and a webhook id already used on this engine is replaced. preview: true returns the same plan and writes nothing. Audited as workflow.imported with source: bundle. Rate limited: 10 req / 60 s.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: importWorkflowBundle
Request body (required)
application/json · object
bundleobjectrequired5 fields
versionstringrequired1.0(workflow only) or2.0(with dependencies).One of: "1.0", "2.0"
exportedAtstring (date-time)workflowobjectrequiredThe workflow graph. Trigger secrets are the
__set__marker.dependenciesobject4 fields
codeTablesarray of object2 fields
namestringentriesobject
mappingSetsarray of object5 fields
namestringsourceFormatstringtargetFormatstringmappingsarray of objectaiGeneratedboolean
adapterProfilesarray of object3 fields
refstringrequiredThe profile's id in the source workspace.
namestringrequiredadapterTypestringrequired
testCasesarray of object5 fields
namestringrequiredsamplestringrequiredA bundled synthetic sample, never message text.
One of: "adt-a01", "siu-s12"
stepIdsarray of stringstartAtstringOne of: "message", "step-input"
expectedobject
metadataobjectreport: what was left out because it came from a real message.
profileMapobjectProfile reference → profile id in the target workspace. Ids outside the target workspace are ignored.
overwriteCodeTablesbooleanOverwrite code tables that exist with different entries (audited). Default: keep them and warn.
previewbooleanReturn the plan and write nothing.
Responses
- 201Imported (200 with `{ plan, warnings }` for a preview).
Response fields
application/json · object
workflowobject2 fields
idstringnamestring
planobject4 fields
codeTablesarray of object2 fields
namestringactionstringOne of: "create", "reuse", "differs", "overwrite", "missing"
profilesarray of object4 fields
refstringnamestringadapterTypestringresolvedTostring | null
secretsResetarray of stringwebhookIdChangedboolean
warningsarray of string
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 422The request is well formed but cannot be processed.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/import" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"bundle": {
"version": "1.0",
"exportedAt": "2026-01-01T00:00:00Z",
"workflow": {},
"dependencies": {
"codeTables": [
{
"name": "string",
"entries": {}
}
],
"mappingSets": [
{
"name": "string",
"sourceFormat": "string",
"targetFormat": "string",
"mappings": [
{}
],
"aiGenerated": true
}
],
"adapterProfiles": [
{
"ref": "string",
"name": "string",
"adapterType": "string"
}
],
"testCases": [
{
"name": "string",
"sample": "adt-a01",
"stepIds": [
"string"
],
"startAt": "message",
"expected": {}
}
]
},
"metadata": {}
},
"profileMap": {},
"overwriteCodeTables": true,
"preview": true
}'Promote a workflow to another workspace, with a diff
post/api/workflows/{id}/promote
Admin only. Promotes the workflow and what it depends on (the topics it publishes to or subscribes from, a linked template, the workflows its Call workflow steps call, at the version each call runs, and the components its Component steps pin, at the pinned release; the copy's calls and Component steps point at their copies in the target. A component already in the target with the pinned release is reused; otherwise it lands there as a draft component, released on its page there, and the preview's warnings name the release to cut) to targetWorkspaceId as one bundle, in one transaction, with the same rules as POST /api/workflows/import for code tables, mapping sets and trigger secrets. The copy in the target is matched by the workflow's stable key (a slug set on its first promotion); topics by name; a dependency already in the target with the same settings is reused, a differing topic is kept with a warning. Connections are mapped, never copied: profileMap[ref], else the mapping remembered from the last promotion between the two workspaces, else the unique profile with the same name and type. preview: true writes nothing and returns { key, sourceVersion, target, diff, dependencies, connections, senders, plan, warnings, fingerprint } (target.draftWaiting: a newer undeployed draft there is replaced; it stays in Versions). Send the preview's fingerprint back as expectedFingerprint: if anything changed since (a source edit, a deploy or edit there, another promotion), the call is a 409 with code: PREVIEW_STALE and nothing is written; two first promotions at once make one copy and the other gets the same 409. The sender table is per environment: a new copy starts from the source's, an existing copy keeps its own (senders gives the row counts). The first promotion creates a copy that is turned off (201); a later one updates it as a new draft version (200). Nothing is deployed: Deploy in the target runs its test cases and needs approval. If that copy is turned on but was never deployed, the call is a 409. A new key is unique across all workspaces, so unrelated workflows that share a name never match each other's copy. A component (kind: component) is promoted the same way, with the components it uses, and lands as a draft component. Audited as promotion.applied in both workspaces. Rate limited: 10 req / 60 s.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: promoteWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Request body (required)
application/json · object
targetWorkspaceIdstringrequiredA different workspace's id.
profileMapobjectProfile reference → profile id in the target workspace. Ids outside the target workspace are ignored.
overwriteCodeTablesbooleanOverwrite code tables that exist with different entries (audited). Default: keep them and warn.
previewbooleanReturn the plan and write nothing.
expectedFingerprintstringThe preview's
fingerprint: promote only if nothing changed since (else 409 PREVIEW_STALE).
Responses
- 201Created in the target (200 when the existing copy was updated as a draft, or the preview).
Response fields
application/json · object
promotionIdstringworkflowobject2 fields
idstringnamestring
targetWorkspaceIdstringtargetVersionintegerThe draft version number it landed as.
createdbooleankeystringThe stable key that matches it across workspaces.
diffobject3 fields
linesarray of object2 fields
opstringOne of: "same", "add", "del"
textstring
countsobject2 fields
addedintegerremovedinteger
changedbooleanFalse when the target already has exactly this.
dependenciesarray of object6 fields
kindstringOne of: "topic", "template", "component", "workflow"
keystringThe stable key it is matched by.
labelstringactionstringOne of: "create", "reuse", "update", "keep", "differs", "missing"
notestringFor a topic: publishes, subscribes or both. For a component or a called workflow: the release it travels at.
draftWaitingbooleanA component whose draft in the target has changes no release there has: the update replaces it (it stays in Versions there).
connectionsarray of object6 fields
refstringThe profile's id in the source workspace.
namestringadapterTypestringresolvedTostringThe target profile's id, or null when not mapped.
resolvedNamestringmappedBystringOne of: "picked", "saved", "name"
planobject4 fields
codeTablesarray of object2 fields
namestringactionstringOne of: "create", "reuse", "differs", "overwrite", "missing"
profilesarray of object4 fields
refstringnamestringadapterTypestringresolvedTostring | null
secretsResetarray of stringwebhookIdChangedboolean
warningsarray of string
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 422The request is well formed but cannot be processed.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/promote" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"targetWorkspaceId": "string",
"profileMap": {},
"overwriteCodeTables": true,
"preview": true,
"expectedFingerprint": "string"
}'Deployment history per environment
get/api/workflows/{id}/deployments
The workflow's environments: its own workspace and, for an admin, its promoted copies in other workspaces (same stable key). Each with the deployed version, whether a newer draft is waiting, its deployments (newest first, with where a promoted version came from) and the rollback target (the previous deployed version).
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listWorkflowDeployments
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Responses
- 200The environments.
Response fields
application/json · object
environmentsarray of object9 fields
workspaceobject3 fields
idstringnamestringcolorstring
workflowIdstringnamestringcurrentbooleandeployedVersionintegerliveVersionintegerdraftWaitingbooleanhistoryarray of object10 fields
idstringversionintegerpreviousVersionintegerkindstringOne of: "deploy", "rollback"
rollbackTointegeroverridebooleanpromotionIdstringpromotedFromobject2 fields
workspaceNamestringversioninteger
deployedBystringdeployedAtstring (date-time)
rollbackobject2 fields
versionintegerversionIdstring
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/deployments" \
-H "Authorization: Bearer $TOKEN"Roll back to the previous deployed version
post/api/workflows/{id}/deployments
One-click rollback: restores the previous deployed version and deploys it, through the same rules as POST /api/workflows/{id}/deploy with action: rollback (it must validate, and every destination needs a profile in the workspace). Viewers can't. 409 when there is no earlier deployment (or its version is no longer kept). Audited as promotion.rolled_back, workflow.rollback and workflow.deployed. Rate limited with deploys: 10 req / 60 s.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: rollbackWorkflowDeployment
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Request body (required)
application/json · object
actionstringrequiredOne of: "rollback"
reasonstringKept in the audit trail (500 characters).
Responses
- 200Rolled back: the new live version number, deployed.
Response fields
application/json · object
currentintegerdeploymentobject
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/deployments" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "rollback",
"reason": "string"
}'A workflow's sender settings
get/api/workflows/{id}/senders
One workflow, many senders: the sender table, keyed by MSH-4 and optionally MSH-3. A row with MSH-3 beats the MSH-4 row, which beats the default row (*); the default row's values sit under the matched row's.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowSenders
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id in the caller's workspace. |
Responses
- 200The sender table.
Response fields
application/json · object
sendersarray of object4 fields
facilitystringrequiredMSH-4 (first component). "*" is the default row.
applicationstringMSH-3 (first component). Omit for any application.
labelstringA name for people, never read by a step.
valuesobjectrequiredKey → value, read as
{{sender.key}}in step settings andsender.keyin JavaScript.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/senders" \
-H "Authorization: Bearer $TOKEN"Replace a workflow's sender settings
put/api/workflows/{id}/senders
Replaces the table (an empty list removes it). Applies to the next message, with no new version and no deploy. A step that reads a key the sender has no value for, or a sender no row matches, fails and is not retried. Values are settings, not secrets: put a secret in a workspace variable and its {{env.NAME}} in the value. Audited as workflow.senders_changed (count and keys, never values).
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: putWorkflowSenders
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id in the caller's workspace. |
Request body (required)
application/json · object
sendersarray of object4 fields
facilitystringrequiredMSH-4 (first component). "*" is the default row.
applicationstringMSH-3 (first component). Omit for any application.
labelstringA name for people, never read by a step.
valuesobjectrequiredKey → value, read as
{{sender.key}}in step settings andsender.keyin JavaScript.
Responses
- 200The saved table.
Response fields
application/json · object
sendersarray of object4 fields
facilitystringrequiredMSH-4 (first component). "*" is the default row.
applicationstringMSH-3 (first component). Omit for any application.
labelstringA name for people, never read by a step.
valuesobjectrequiredKey → value, read as
{{sender.key}}in step settings andsender.keyin JavaScript.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/workflows/<id>/senders" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"senders": [
{
"facility": "string",
"application": "string",
"label": "string",
"values": {}
}
]
}'Linked template status and update preview
get/api/workflows/template-updates
With workflowId: link, the template the workflow was made from (the version it took, the newest, updateAvailable), and template, the workflow as a template (its linked workflows). With templateId (a workflow or gallery template id): template. With templateId and preview: preview.from and preview.to, the linked workflow's definition now and after the update.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getTemplateUpdates
Parameters
| Name | In | Type | Description |
|---|---|---|---|
workflowId | query | string | A workflow in the caller's workspace. |
templateId | query | string | A workflow or gallery template id. |
preview | query | string | A linked workflow id to preview the update for. |
Responses
- 200The status, or the preview.
Response fields
application/json · object
linkobject | null6 fields
templateIdstringtemplateNamestring | nullkindstring | nulltemplateVersionstring | nulllatestVersionstring | nullupdateAvailableboolean
templateobject | null6 fields
idstringnamestringkindstringworkfloworgallery.versionstringA workflow template's live version, or a gallery version.
linkedarray of object5 fields
idstringnamestringtemplateVersionstring | nullupdateAvailablebooleandeployedVersioninteger | null
pendingintegerLinked workflows with an update.
previewobject3 fields
workflowIdstringfromobjectThe workflow graph now.
toobjectThe workflow graph after the update.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/template-updates" \
-H "Authorization: Bearer $TOKEN"Update all linked workflows
post/api/workflows/template-updates
Applies the template to every linked workflow (or workflowIds). Each takes the template's steps and wiring and keeps its own name, trigger, destination profiles, sender table and test cases. A destination step new in the template takes the profile given in bindings, else none (never the template's own). Its saved test cases are dry-run against the result first; a workflow that fails validation or a case, has an active destination without a usable profile, was saved while the update ran, or hits an error is held back unchanged. An updated workflow gets a new draft version and nothing is deployed: a deployed workflow keeps running its deployed version until it is deployed through the usual checklist. Audited as workflow.template_update with the workflows updated and held back.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: updateLinkedWorkflows
Request body (required)
application/json · object
templateIdstringrequiredworkflowIdsarray of stringbindingsmap of map of stringWorkflow id → step id → adapter profile id, for destination steps a linked workflow has no profile for.
Responses
- 200What changed.
Response fields
application/json · object
templateVersionstringupdatedarray of object6 fields
idstringnamestringfromTemplateVersionstring | nullversionintegerThe workflow's new newest (draft) version.
deployedVersioninteger | nullUnchanged: the version production runs until the draft is deployed.
testCasesobject | null3 fields
totalintegerpassedintegerfailedinteger
heldBackarray of object5 fields
idstringnamestringreasonstringprofiles,validation,test-cases,changed(saved while the update ran) orerror.testCasesobject3 fields
totalintegerpassedintegerfailedinteger
issuesarray of string
upToDatearray of object2 fields
idstringnamestring
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/template-updates" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"templateId": "string",
"workflowIds": [
"string"
],
"bindings": {}
}'A workflow's releases
get/api/workflows/{id}/releases
Releases of a callable workflow, newest first: semver labels on deployed versions. A Call workflow step pins a release or follows the newest one (latest); deploying alone changes nothing for callers.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listWorkflowReleases
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id in the caller's workspace. |
Responses
- 200The releases.
Response fields
application/json · object
releasesarray of object6 fields
idstringlabelstringSemver label, e.g. 1.2.0.
versionintegerThe deployed integer version it points at.
notesstring | nullcreatedBystring | nullcreatedAtstringISO 8601.
deployedVersioninteger | nullsuggestedobject3 fields
patchstringminorstringmajorstring
canReleasebooleanWhether the caller may cut a release.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/releases" \
-H "Authorization: Bearer $TOKEN"Release the deployed version
post/api/workflows/{id}/releases
Labels the deployed version (it passed the Deploy checklist and approval) as a release. The label must be semver and higher than every earlier release. A workflow that was never deployed is refused (409), as is a deployed version that is already released. Audited as workflow.release_created.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: createWorkflowRelease
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id in the caller's workspace. |
Request body (required)
application/json · object
labelstringrequirede.g. 1.2.0
notesstringWhat changed.
Responses
- 201The release.
Response fields
application/json · object
releaseobject6 fields
idstringlabelstringSemver label, e.g. 1.2.0.
versionintegerThe deployed integer version it points at.
notesstring | nullcreatedBystring | nullcreatedAtstringISO 8601.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/releases" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "string",
"notes": "string"
}'Workflows a Call workflow step can call
get/api/workflows/callable
The caller's workspace's workflows with their releases and the contract a call is checked against (the newest release's, else the deployed version's, else the draft's).
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listCallableWorkflows
Responses
- 200The workflows.
Response fields
application/json · object
workflowsarray of object7 fields
idstringnamestringenabledbooleandeployedVersioninteger | nullreleasesarray of object2 fields
labelstringversioninteger
contractobjectInputs and outputs (JSON Schema objects), or null when none are declared.
contractFromstring | nullrelease, deployed or draft; null without a contract.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/callable" \
-H "Authorization: Bearer $TOKEN"Components
get/api/components
The workspace's components: reusable groups of steps that workflows insert at a pinned release (Component step), run inline in the caller's execution.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listComponents
Responses
- 200The components.
Response fields
application/json · object
componentsarray of object8 fields
idstringnamestringdescriptionstring | nullreleasesarray of object3 fields
labelstringSemver, e.g. 1.0.0.
versionintegersendsarray of objectThe release's send steps. A Component step's connection per sender applies to them.
3 fields
idstringlabelstringadapterProfileIdstringThe component's own connection: the default when a workflow sends per sender.
contractobjectInputs and outputs (JSON Schema objects of named fields), or null.
draftChangedbooleanThe draft has changes no release has.
usedByintegerWorkflows that use it.
updatedAtstringISO 8601.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/components" \
-H "Authorization: Bearer $TOKEN"Save steps as a component
post/api/components
The picked steps of graph (one step, or steps that follow on from one step, ending in one step; not the start or the router) become a component, released as 1.0.0. A step with a secret typed into its settings is refused (400): connections stay references. Audited as component.created and component.released.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: createComponent
Request body (required)
application/json · object
namestringrequireddescriptionstringcontractobjectInputs and outputs (JSON Schema objects of named fields), or null.
stepIdsarray of stringrequiredfromWorkflowIdstringThe workflow the steps came from.
graphobjectrequired{ startNodeId, nodes, edges } of the workflow.
Responses
- 201The component and its first release.
Response fields
application/json · object
componentobject2 fields
idstringnamestring
releaseobject6 fields
idstringlabelstringversionintegerThe integer version it labels.
notesstring | nullcreatedBystring | nullcreatedAtstringISO 8601.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/components" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"contract": {},
"stepIds": [
"string"
],
"fromWorkflowId": "string",
"graph": {}
}'A component
get/api/components/{id}
Its draft steps and graph, contract, releases, whether the draft has unreleased changes, and Used by (workflows × release). Steps and contract are edited by saving the draft (PUT /api/workflows/{id}); workflows keep their pinned release.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getComponent
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Component id in the caller's workspace. |
Responses
- 200The component.
Response fields
application/json · object
componentobject10 fields
idstringnamestringdescriptionstring | nullliveVersionintegerdraftChangedbooleancontractobjectInputs and outputs (JSON Schema objects of named fields), or null.
stepsarray of object3 fields
idstringtypestringlabelstring
graphobjectThe draft's trigger, nodes, edges and start.
releasesarray of object6 fields
idstringlabelstringversionintegerThe integer version it labels.
notesstring | nullcreatedBystring | nullcreatedAtstringISO 8601.
usedByarray of object6 fields
workflowIdstringworkflowNamestringreleasestringThe release its Component steps pin.
stepsintegerHow many of its steps use that release.
deployedbooleanPinned in the version that runs.
draftbooleanPinned in the draft.
canReleaseboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/components/<id>" \
-H "Authorization: Bearer $TOKEN"Delete a component
delete/api/components/{id}
Removes a component no workflow uses; 409 names the workflows that still do. Audited as component.deleted.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: deleteComponent
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Component id in the caller's workspace. |
Responses
- 200Deleted.
Response fields
application/json · object
deletedboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X DELETE "$ENGINE_URL/api/components/<id>" \
-H "Authorization: Bearer $TOKEN"Release a component
post/api/components/{id}/releases
Runs the component's saved tests on its draft (a failure holds the release back: 409 with testCases), then labels the draft as label (semver, higher than every earlier release). Workflows keep the release they pin until they are updated. 409 when nothing changed since the newest release. Audited as component.released.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: releaseComponent
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Component id in the caller's workspace. |
Request body (required)
application/json · object
labelstringrequirede.g. 1.1.0
notesstringWhat changed.
Responses
- 201The release.
Response fields
application/json · object
releaseobject6 fields
idstringlabelstringversionintegerThe integer version it labels.
notesstring | nullcreatedBystring | nullcreatedAtstringISO 8601.
testCasesobjectTest run summary, or null.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/components/<id>/releases" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "string",
"notes": "string"
}'A release's impact
get/api/workflows/release-updates
Every consumer of a component or callable workflow (workflows, and components that contain it) and the release each pins, in its draft and in what runs, with the contract change from the previous release. A change a consumer relies on (a new required input, a removed or retyped output) is breaking and marks the release major.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getReleaseImpact
Parameters
| Name | In | Type | Description |
|---|---|---|---|
targetIdrequired | query | string | A component or callable workflow id. |
release | query | string | A release label. Default: the newest. |
Responses
- 200The impact.
Response fields
application/json · object
impactobject7 fields
targetobject3 fields
idstringnamestringkindstringcomponentorworkflow.
releasestringpreviousstring | nullThe release before it.
bumpstringnone,patch,minorormajor(from the previous release).contractobject2 fields
levelstringnone,minorormajor(a breaking change).changesarray of object4 fields
sidestringinputoroutput.fieldstringbreakingbooleantextstringPlain words, e.g.
Output "room" was removed.
majorbooleanFrom the previous release: a major label or a breaking contract change. A consumer several releases behind can still be major on its own (its
major).consumersarray of object9 fields
idstringnamestringkindstringworkflow, orcomponent(a component that contains it).draftReleasesarray of stringWhat the draft pins: release labels, or
latest/deployedfor a Call workflow step that follows the newest release or the deployed version.deployedReleasesarray of stringWhat runs: the deployed version, or a component's releases.
stepsintegerSteps that use it.
statusstringupdate-available,up-to-date,follows-newestorfollows-deployed(never updated: the author chose to follow).fromstring | nullWith an update available: the oldest release its draft pins, which the update moves from.
majorbooleanWith an update available: moving from
fromis major (a major label or a breaking contract change), so it needsacknowledgeMajor.
canUpdatebooleanThis caller may run tests and update (operators and admins).
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/release-updates?targetId=string" \
-H "Authorization: Bearer $TOKEN"Run tests, or update selected/all consumers to a release
post/api/workflows/release-updates
Each consumer with an update available (or workflowIds) gets its pins moved to release. Its saved test cases (whole workflow and Run with sample step cases) run against that first; a consumer that fails a case or validation, was saved while the update ran, or hits an error is held back unchanged with the reason. An updated consumer gets a new draft version: nothing is deployed, so each one then goes through the deploy checklist. A consumer whose update is major (from the oldest release it pins) is held back unless acknowledgeMajor. dryRun (Run tests) checks only and writes nothing, major or not; it answers ready, with major on a consumer that will need the acknowledgement. Same update engine as linked templates. An update is audited as component.update or workflow.call_update.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: updateReleaseConsumers
Request body (required)
application/json · object
targetIdstringrequiredreleasestringrequiredA release label, e.g. 1.1.0.
workflowIdsarray of stringacknowledgeMajorbooleandryRunbooleanRun tests only.
Responses
- 200What changed, would change, or was held back.
Response fields
application/json · object
releasestringdryRunbooleanupdatedarray of object5 fields
idstringnamestringversionintegerThe consumer's new newest (draft) version.
deployedVersioninteger | nullUnchanged.
testCasesobject | null3 fields
totalintegerpassedintegerfailedinteger
readyarray of object4 fields
idstringnamestringtestCasesobject | null3 fields
totalintegerpassedintegerfailedinteger
majorbooleanUpdating it will need
acknowledgeMajor.
heldBackarray of object5 fields
idstringnamestringreasonstringprofiles,validation,test-cases,major,changedorerror.testCasesobject3 fields
totalintegerpassedintegerfailedinteger
issuesarray of stringWhy, in plain words (case names and field names, never values).
upToDatearray of object2 fields
idstringnamestring
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/release-updates" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"targetId": "string",
"release": "string",
"workflowIds": [
"string"
],
"acknowledgeMajor": true,
"dryRun": true
}'List templates made of components
get/api/templates
The workspace's templates (#405): each with its newest release, parameters, the components and callable workflows it uses, how many workflows were made from it and how many of those have an update.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listTemplates
Responses
- 200The templates.
Response fields
application/json · object
templatesarray of object12 fields
idstringrequirednamestringrequireddescriptionstring | nullreleasestring | nullIts newest release.
releasesarray of stringrequiredIts release labels, newest first.
draftChangedbooleanIts steps changed since the newest release.
parametersobject | nullThe parameters: the contract editor's inputs (#400).
3 fields
typestringobject.propertiesmap of objectrequiredarray of string
adapterTypesarray of stringusesarray of object7 fields
kindstringcomponentorworkflow(a Call workflow step).targetIdstringnodeIdstringlabelstringreleasestringThe release it pins (
latest/deployedfor a Call step).namestring | nullneweststring | nullIts newest release.
instancesintegerrequiredWorkflows made from it.
pendingintegerrequiredOf those, how many have an update.
shapestringrequiredThe pattern its steps follow (the gallery card's pill).
One of: "receive-forward", "request-respond", "poll-push", "sync", "batch"
canEditbooleanThis caller may save, publish and update.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/templates" \
-H "Authorization: Bearer $TOKEN"Save a workflow as a template
post/api/templates
A copy of the workflow's draft steps becomes a template (trigger secrets, its callable contract and per-sender connections stay behind). It has no parameters and no release yet. Audited as template.created.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: createTemplate
Request body (required)
application/json · object
namestringrequireddescriptionstringfromWorkflowIdstringrequired
Responses
- 201Saved.
Response fields
application/json · object
templateobject2 fields
idstringnamestring
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/templates" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"description": "string",
"fromWorkflowId": "string"
}'A template made of components
get/api/templates/{id}
Its draft steps and parameters, what it uses (with the newest releases), its releases, and every workflow made from it with its values and the updates it has.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getTemplate
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | A template's id (its workflow row of kind |
Responses
- 200The template.
Response fields
application/json · object
templateobject9 fields
idstringnamestringdraftChangedbooleanparametersobject | nullThe parameters: the contract editor's inputs (#400).
3 fields
typestringobject.propertiesmap of objectrequiredarray of string
adapterTypesarray of stringusesarray of object7 fields
kindstringcomponentorworkflow(a Call workflow step).targetIdstringnodeIdstringlabelstringreleasestringThe release it pins (
latest/deployedfor a Call step).namestring | nullneweststring | nullIts newest release.
releasesarray of object3 fields
labelstringversionintegernotesstring
instancesarray of object8 fields
idstringnamestringtemplateVersionstring | nullThe template release it took.
paramsobjectIts parameter values.
paramsSummarystringtemplateUpdatestring | nullA newer template release, if any.
releasesarray of objectComponents and callable workflows with a newer release.
6 fields
kindstringtargetIdstringnamestringfromstringtostringnodeIdsarray of string
updateAvailableboolean
pendingintegerWorkflows with an update.
canEditboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/templates/<id>" \
-H "Authorization: Bearer $TOKEN"Delete a template
delete/api/templates/{id}
Workflows made from it keep running as they are, with no template to update from. Audited as template.deleted.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: deleteTemplate
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | A template's id (its workflow row of kind |
Responses
- 200Deleted.
Response fields
application/json · object
deletedboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X DELETE "$ENGINE_URL/api/templates/<id>" \
-H "Authorization: Bearer $TOKEN"Publish a template release
post/api/templates/{id}/releases
The draft becomes release label (semver, higher than every earlier one). Refused (400) when a step uses {{params.x}} for an undeclared parameter, holds a typed-in secret, or a Component step pins no release; 409 when nothing changed. Audited as template.released.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: releaseTemplate
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | A template's id (its workflow row of kind |
Request body (required)
application/json · object
labelstringrequirede.g. 1.1.0
notesstring
Responses
- 201Published.
Response fields
application/json · object
releaseobject2 fields
labelstringversioninteger
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/templates/<id>/releases" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"label": "string",
"notes": "string"
}'Fill in a template (New from template)
post/api/templates/{id}/render
The workflow a template (or a gallery template) makes from parameters and bindings (adapter type → profile id). A built-in made of components installs its bundled components first (audited). Nothing else is written: create it with POST /api/workflows { ...workflow, templateId, templateParams }.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: renderTemplate
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | A template's id (its workflow row of kind |
Request body (required)
application/json · object
namestringrequiredparametersobjectbindingsobjectAdapter type → profile id.
Responses
- 200The workflow to create.
Response fields
application/json · object
workflowobjecttemplateIdstringtemplateVersionstringtemplateParamsobjectwarningsarray of string
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/templates/<id>/render" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"parameters": {},
"bindings": {}
}'Update the workflows made from a template
post/api/templates/{id}/update-instances
A newer template release first (each workflow rendered with its own values), then each newer component or callable workflow release, through the one update engine: each workflow's test cases run first and a failure holds it back. Updates are drafts; nothing is deployed. Audited as workflow.template_update and component.update / workflow.call_update.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: updateTemplateInstances
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | A template's id (its workflow row of kind |
Request body (required)
application/json · object
workflowIdsarray of stringacknowledgeMajorboolean
Responses
- 200What changed or was held back.
Response fields
application/json · object
sourceobjecttemplateobject | null3 fields
updatedarray of objectheldBackarray of objectupToDatearray of object
releasesarray of object3 fields
targetobjectreleasestringresultobject3 fields
updatedarray of objectheldBackarray of objectupToDatearray of object
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/templates/<id>/update-instances" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workflowIds": [
"string"
],
"acknowledgeMajor": true
}'List the sample library
get/api/workflows/{id}/test-steps
The samples Run with sample can use, by name only: the workflow's saved sample, the bundled synthetic messages and the saved test cases, each with its sender (MSH-4) when it has one. senders lists the senders the picker can narrow the library to: the workflow's sender table, its per-sender connection tables and the samples' own. No content.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listStepTestSamples
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The library.
Response fields
application/json · object
libraryarray of object4 fields
idstringlabelstringkindstringsaved, bundled or case
senderstringThe sample's MSH-4; absent when it has none
sendersarray of object2 fields
facilitystringMSH-4
labelstringThe sender table row's name, when set
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/test-steps" \
-H "Authorization: Bearer $TOKEN"Run steps with a sample
post/api/workflows/{id}/test-steps
Runs one step, or a connected group of steps that start from one step, on a sample and returns each step's input and output. startAt: message (the default) treats the sample as the message as received: the steps before the selection run first, without side effects, and nothing after the selection runs. startAt: step-input uses the sample (JSON, else text) as the first step's input. Nothing is stored or sent: destinations report what they would send and Run workflow steps start nothing, unless sendForReal: true, which makes the selected destinations really send. A stored sample (saved, a test case, a past message) needs permission to view message content (403). graph runs the builder's unsaved edits. A past message must belong to this workflow (else 404). A stored sample is audited as the read it is (message.viewed with the message id, workflow.test_case_read with the case id, workflow.sample_read). Every run, a failed one too, is audited as workflow.step_test with counts, the sample's source and record id, sendForReal and the outcome; never content. With live: true, a dry run on a pasted sample is audited once per person and workflow every 10 minutes instead. A test case pinned from a real message (fromRealMessage) answers masked for every role, with masked: true: the sample and each step's input, output, console lines and errors, as GET .../test-cases/{caseId} masks them. phi=reveal with a reason answers unmasked and is audited as phi.revealed (resourceType test_case, the reason only); if that record can't be written the answer is a 500 with no content. A reveal without a valid reason is a 400 and nothing runs. Every other run answers masked too (phiMasked: true, masked: false): each step's input and output (rawMessage and parsedMessage included), errors and warnings, and the sample, with console lines withheld; a bundled synthetic sample answers as is. phi=reveal with a reason answers it unmasked after writing phi.revealed (the reason, the patient's keyed hash, part: "run", never a value) before anything runs: a viewer's reveal is 403 PHI_REVEAL_FORBIDDEN, and a reveal that can't be recorded runs nothing (500 PHI_REVEAL_NOT_RECORDED). Not cached.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: runWorkflowSteps
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
phi | query | string |
|
reason | query | string | Why PHI is shown: troubleshooting, patient-request or audit. |
Request body (required)
application/json · object
stepIdsarray of stringrequiredsampleobject | object | objectrequired3 fields
option 1object2 fields
sourcestringrequiredpasted
messagestringrequiredHL7v2, JSON or text.
option 2object2 fields
sourcestringrequiredlibrary
idstringrequiredsaved,bundled:adt-a01,bundled:adt-a08,bundled:siu-s12orcase:<test case id>(GET lists them).
option 3object2 fields
sourcestringrequiredmessage
messageIdstringrequiredA past message's id.
startAtstringmessage (default) or step-input
graphobjectThe editor's graph: { trigger, nodes, edges, startNodeId }.
sendForRealbooleanSelected destinations really send. Default false.
livebooleanThe builder's live proof. A dry run on a pasted sample is then audited once per person and workflow every 10 minutes, with
coalescedRuns, instead of once per run. Default false.
Responses
- 200Each selected step's input and output.
Response fields
application/json · object
statusstringThe run's status, or not-reached when no selected step ran.
errorstring | nullearlierStepsintegerSteps run before the selection.
stoppedAtobject | null3 fields
nodeIdstringnodeNamestringreasonstring
stepsarray of object11 fields
nodeIdstringnodeNamestringnodeTypestringstatusstringcompleted, failed, skipped, or not-run when the sample stopped before it.
inputobjectWhat the step received.
outputobjectWhat the step produced.
errorstring | nulllogsarray of stringA JavaScript step's console lines.
warningsarray of stringdurationMsinteger | nulleffectstring | nulldry-run(a destination that reported what it would send),sent(it really sent),not-run-in-test(a Run workflow step: the other workflow isn't started), or null.
sendForRealbooleansampleobject2 fields
sourcestringtextstringThe sample that ran.
maskedbooleanTrue when the sample is a real message's test case read without a reveal: the content above is masked.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/test-steps" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"stepIds": [
"string"
],
"sample": {
"source": "string",
"message": "string"
},
"startAt": "string",
"graph": {},
"sendForReal": true,
"live": true
}'Replay an HL7 export or batch file
post/api/workflows/{id}/replay-batch
Splits a Rhapsody/Mirth message export, an HL7 batch file (FHS/BHS … BTS/FTS) or an MLLP capture (CR, LF or CRLF; ACKs in a capture are skipped) and replays it. mode=dry-run runs every message through the saved workflow's dry run (trigger rules, then every step; nothing is delivered) and returns each output as a field map; with expected (JSON lines: {"controlId"|"index", "output"} per line) each output is diffed field by field. mode=mllp sends each message to host:port at rate per second over one connection and records the ACK code; the target must be listed in MLLP_REPLAY_TARGETS (403 otherwise, or when unset). Limits: 5 MB per file, 500 messages, 240 s of sending per request. Operator or admin only. Responses are no-store; the audit entry (workflow.batch_replayed) records counts only. Rate limited: 5 req / 60 s.
Auth: Bearer token (how to get one) · Operation: replayWorkflowBatch
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id (must be in the caller's workspace). |
Request body (required)
multipart/form-data · object
filestring (binary)requiredmodestringrequiredOne of: "dry-run", "mllp"
expectedstring (binary)dry-run only: expected output, JSON lines.
hoststringmllp only.
portintegerratenumbermllp only: messages per second.
charsetstringThe file's character set: it is read with it, and in mllp mode sent with it. Omitted: UTF-8, or Windows-1252 when the bytes are not valid UTF-8.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
Responses
- 200Per-message results.
Response fields
application/json · object
modestringOne of: "dry-run", "mllp"
targetstringmllp: host:port.
summarymap of integerenvelopeobject3 fields
fileHeaderbooleanbatchesintegerwarningsarray of string
framingstringOne of: "mllp", "plain"
acksSkippedintegerrejectedarray of objectMalformed messages: position in the file and a reason (never content).
2 fields
indexintegerreasonstring
resultsarray of object8 fields
indexintegercontrolIdstringstatusstringOne of: "ok", "failed"
outputstringfieldsmap of stringexpectedobjectackstring | nullerrorstring
- 400Bad mode, target or rate; not HL7 v2 text; too many messages; an expected line that is not JSON; or an MLLP run longer than the per-request limit.
application/json · ApiError
- 403Viewer role, or the MLLP target is not in MLLP_REPLAY_TARGETS.
application/json · ApiError
- 404Workflow not found in this workspace.
application/json · ApiError
- 413`PAYLOAD_TOO_LARGE` — a file over 5 MB.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/replay-batch" \
-H "Authorization: Bearer $TOKEN" \
-F 'file=@file' \
-F 'mode=dry-run' \
-F 'expected=@expected'Deploy state
get/api/workflows/{id}/deploy
The Versions screen state: the version timeline, the deployed marker, the deploy checklist (validation, the newest passing dry run or execution, the saved test cases (testCases: count and newest run), the newest sandbox run when Settings > Environments requires one (sandbox, null otherwise: its result, when it ran and in which workspace), approval, and what is missing: test, test-cases, sandbox, approval), the workflow's environment (its workspace's: production or sandbox; a sandbox deploy needs no approval), the rollback target and what the caller may do. Production runs the deployed version, so a save after a deploy stays a draft until you deploy it. rollout (R23) says whether canary and scheduled deploys are on (enabled: on unless the engine sets CANARY_DEPLOY_ENABLED=false), the canary percents, the running canary (version, percent, startedAt, promotesAt, runs, failed) and the scheduled deploy (version, at, mode, percent). lastDryRun is the newest dry-run-recent result while it still applies (the same live version, against the same deployed version, run after the live save), with at, so Versions keeps holding Deploy after a reload; null otherwise.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowDeployState
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
Example request
curl "$ENGINE_URL/api/workflows/<id>/deploy" \
-H "Authorization: Bearer $TOKEN"Deploy (now, as a canary or later), approve, roll back or dry-run recent messages
post/api/workflows/{id}/deploy
deploy marks the live version deployed and enables the workflow. It needs a valid workflow, a passing test newer than the live save, passing saved test cases when the workflow has any, a passing run of its sandbox copy when Settings > Environments requires one (production workspaces, while a sandbox workspace exists), and approval in a production workspace (a second admin's; in a sandbox workspace anyone with Operator deploys without one); a missing one is a 409 with missing (test, test-cases, sandbox, approval), and code SANDBOX_RUN_REQUIRED when sandbox is among them. env, when given, must be the workflow's workspace's environment, else 409 WRONG_ENVIRONMENT (promote the workflow to deploy it elsewhere). A version (deployed or rolled back to) that calls a connection without the workflow's environment is 409 CONNECTION_ENVIRONMENT with environment and the connections' names in missing; the error says the fix (set the workflow's environment to its workspace's when they differ, else add the environment to the connection in Adapters). The deploy is audited as workflow.deployed with its env. The saved test cases are dry-run during the call (nothing is delivered, at most 50 cases and 30 seconds), audited as workflow.test_cases_run, and a failure carries testCases with the counts and per-case results. A signed-in admin can pass override: true to skip the test, the test cases, the sandbox run and approval (never validation), and the audit log records what was skipped. An API token never can, whatever the client's role: its override is 403 (API tokens can't skip the deploy checklist or its approval), so CI runs a passing dry run, requests approval and deploys once a signed-in admin approved. request-approval asks for approval of the live version. approve approves a pending request; only an admin who is not the requester may do it (403 otherwise). rollback restores versionId and marks it deployed in one step, after validating it; it changes what production runs, so it needs confirm: true (a 400 without it), and an optional reason is kept in the audit trail. dry-run-recent runs the workflow's newest 50 stored messages through the live version as dry runs on the server (nothing is delivered; at most 30 seconds) and, when an older version is deployed, compares each output with that version's. It returns dryRun with counts only (total, delivered, filtered, failed, changed, changedOutside, compared, truncated) and scope, the titles of the steps the diff from the deployed version touches; never message content. changedOutside counts changed outputs where none of those steps came out differently. What a step makes up per run (an MSH-7 from now, a generated MSH-10, FHIR resource ids and the references to them, meta.lastUpdated) is left out of both comparisons, and a message the deployed version itself answers differently on a second run is not counted, so a nondeterministic step never holds Deploy. It is audited as workflow.dry_run_recent with the counts, against (the deployed version it compared with, or null) and truncated, not the titles. The Versions tab holds Deploy while changedOutside is above 0 (OQ-W8); the API does not refuse the deploy, and an admin can override from the tab. A deploy (now, canary or scheduled) while the newest such run of this version has changedOutside above 0 is audited with override: true, "dry-run" in skipped and dryRunChangedOutside, and recorded as an override in the deployment history. Canary and scheduled deploy (R23) are on unless the engine sets CANARY_DEPLOY_ENABLED=false; then starting one is a 409 with code: CANARY_OFF. deploy with rollout: {mode: "canary", percent} (10, 25 or 50, a 400 otherwise) passes the same checks, then runs that share of messages, chosen by message id, on the live version beside the deployed one for 30 minutes; it needs approval even with override, a deployed version and the workflow on (409 otherwise), and is audited as workflow.canary_started. The engine promotes it to every message after 30 minutes under 1% errors (workflow.canary_promoted) and rolls it back on its own at 1% or more (workflow.canary_rolled_back). promote deploys the canary's version now (only the deployed version moves: a workflow turned off stays off) and rollback-canary (with confirm: true) ends it, putting every message back on the deployed version, clearing the canary version's approval (a later save's approval is kept) and recording a rollback in the deployment history; both are a 409 when no canary is running. A canary's errors are its failed and partial runs. deploy with at (an ISO 8601 time in the next 30 days) stores the deploy instead, audited as workflow.deploy_scheduled; it runs when due unless a later save changed the version or, for a canary, the workflow was turned off (workflow.deploy_schedule_cancelled); a new schedule or a canary started now replaces a pending schedule, audited the same way. cancel-schedule clears it. Deploying all at once, or rolling back, ends a running canary and a pending schedule.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: deployWorkflow
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
actionstringrequiredOne of: "deploy", "request-approval", "approve", "rollback", "dry-run-recent", "promote", "rollback-canary", "cancel-schedule"
rolloutobject2 fields
modestringrequiredOne of: "canary", "all"
percentintegerFor a canary: the share of messages.
One of: 10, 25, 50
atstringFor
deploy: schedule it at this ISO 8601 time (next 30 days).overridebooleanAdmin only. Skips the test, the test cases and approval.
versionIdstringFor
rollback.confirmbooleanFor
rollbackandrollback-canary: required true, the person confirmed it.reasonstringFor
rollback: why, kept in the audit trail.envstringThe environment you mean to deploy to; must be the workflow's workspace's.
One of: "production", "sandbox"
proposalstringFor
deployandrequest-approval: the signed proposal of the Agent card this was opened from. When the action succeeds it is auditedai.proposal.resolved(done, or waiting for the second admin), so the card shows it; one that is not this workflow's is ignored.
Responses
- 200Done.
application/json · object
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/deploy" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"action": "deploy",
"rollout": {
"mode": "canary",
"percent": 10
},
"at": "string",
"override": true,
"versionId": "string",
"confirm": true,
"reason": "string",
"env": "production",
"proposal": "string"
}'List workflow versions
get/api/workflows/{id}/versions
The latest 20 versions, as metadata only (no nodes or edges), plus deployedVersion (null when never deployed) and current, the saved workflow's version number (the newest snapshot + 1).
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listWorkflowVersions
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
Example request
curl "$ENGINE_URL/api/workflows/<id>/versions" \
-H "Authorization: Bearer $TOKEN"Get one workflow version
get/api/workflows/{id}/versions/{version}
A saved version with its full nodes, edges and trigger.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowVersion
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
versionrequired | path | string | Version number. |
Responses
Example request
curl "$ENGINE_URL/api/workflows/<id>/versions/<version>" \
-H "Authorization: Bearer $TOKEN"Restore a workflow version
post/api/workflows/{id}/versions/{version}/rollback
Snapshots the current state as a new version first, so the rollback can be undone, then replaces the nodes, edges and trigger from the chosen version and renames the workflow <name> (restored from v<N>). If the workflow is enabled, every destination step must have an adapter profile in this workspace, or the call is a 400 with details.code of DESTINATION_PROFILE_MISSING.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: restoreWorkflowVersion
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
versionrequired | path | string | Version number. |
Responses
- 200Restored.
Response fields
application/json · object
successbooleanrestoredFromVersionintegerworkflowWorkflow
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/versions/<version>/rollback" \
-H "Authorization: Bearer $TOKEN"Run a workflow with a sample message
post/api/workflows/{id}/replay
Starts the deployed version of an enabled workflow with message as its trigger input, like live traffic. A string is read as HL7v2, plain text or a JSON string; an object is a parsed payload. It answers at once with the new execution, which is pending until the work runner (any replica) starts it; poll GET /api/executions/{id} for the result. The run is not in an ordering lane. Needs a valid license. Rate limited to 30 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: replayWorkflowSample
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
messagestring | objectrequired2 fields
option 1stringoption 2object
Responses
- 202Started.
Response fields
application/json · object
executionobject3 fields
idstringstatusstringstartedAtstring (date-time)
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/replay" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"message": "string"
}'Stored message encryption for a workflow
get/api/workflows/{id}/message-encryption
Whether this workflow's stored messages (execution input, step outputs and step diagnostics) are encrypted at rest with AES-256-GCM: its own encryptMessages setting, whether ENCRYPT_STORED_MESSAGES turns it on for every workflow (forcedByEngine), and the effective result. keyRotatedAt is when the engine key was last rotated (the newest encryption.key_rotated audit event), or null.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowMessageEncryption
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The setting.
Response fields
application/json · object
encryptMessagesbooleanforcedByEnginebooleaneffectivebooleankeyRotatedAtstring (date-time) | null
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/message-encryption" \
-H "Authorization: Bearer $TOKEN"Turn stored message encryption on or off for a workflow
put/api/workflows/{id}/message-encryption
Applies to messages stored after the change; rows already stored keep the form they were written in and read either way. Admin only. Audited as workflow.message_encryption_changed with the old and new values.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: setWorkflowMessageEncryption
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
encryptMessagesbooleanrequired
Responses
- 200Saved.
application/json · object
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/workflows/<id>/message-encryption" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"encryptMessages": true
}'Execution retention for a workflow
get/api/workflows/{id}/retention
How long this workflow's executions (raw PHI) are kept before the purge deletes them: its own retentionDays, or null for the engine default (EXECUTION_RETENTION_DAYS, engineDefaultDays; 0 means no limit), and the effectiveDays that apply. keepFailedDays keeps failed and partial executions longer (null: they follow the same period); effectiveFailedDays is how long they are actually kept, never less than effectiveDays (0 means no limit). Executions of a deleted workflow fall back to the engine default. storageMode is what a successful run keeps (full: everything; production: the input and the outputs of send and last steps; raw: the input only; metadata: no content); failed, partial and cancelled runs always keep everything, and queuedDestinations true means the workflow's runs store in full whatever the mode. contentRetentionDays removes message content (input, step outputs) after that many days while the run rows stay for the retention period (null: off).
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowRetention
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The retention.
Response fields
application/json · object
retentionDaysinteger | nullkeepFailedDaysinteger | nullengineDefaultDaysintegereffectiveDaysintegereffectiveFailedDaysintegerstorageModestringOne of: "full", "production", "raw", "metadata"
storageModesarray of stringcontentRetentionDaysinteger | nullqueuedDestinationsbooleanminDaysintegermaxDaysinteger
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/retention" \
-H "Authorization: Bearer $TOKEN"Set a workflow's execution retention
put/api/workflows/{id}/retention
Sets this workflow's own retention in whole days, from 7 (the ACK queue window) to 3650, or null to use the engine default, and keepFailedDays, the days its failed and partial executions are kept (same bounds; null: the same period). Send either or both; a field left out is unchanged. Failed executions are never deleted sooner than the rest. 0 (keep forever) is not allowed per workflow. The purge applies it even when the engine default is off. storageMode (full, production, raw or metadata) and contentRetentionDays (same bounds, or null for off) are set the same way. Audited as workflow.retention_changed with the old and new values of every setting.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: setWorkflowRetention
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
retentionDaysinteger | nullkeepFailedDaysinteger | nullstorageModestringOne of: "full", "production", "raw", "metadata"
contentRetentionDaysinteger | null
Responses
- 200Saved.
application/json · object
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/workflows/<id>/retention" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"retentionDays": 7,
"keepFailedDays": 7,
"storageMode": "full",
"contentRetentionDays": 7
}'A polling trigger's cursor state
get/api/workflows/{id}/poll-cursor
Where the workflow's deployed polling trigger has got to: whether a cursor is stored, how many item ids it remembers, the last and next poll, the last poll error and whether a poll is running now. The cursor value itself is never returned (it is a value from the source). lastError is PHI-safe: quoted values, upstream bodies and URL query values are withheld. lastErrorState is waiting when the poll holds back on purpose (the max in flight, a full backlog) and failed otherwise; lastPolledAt is the last poll that read the source. polling is false when the deployed trigger is not polling.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowPollCursor
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The cursor state.
Response fields
application/json · object
pollingbooleancursorSetbooleankeysRememberedintegerlastPolledAtstring (date-time) | nullnextPollAtstring (date-time) | nulllastErrorstring | nulllastErrorStatestring | nullOne of: "waiting", "failed"
pollInProgressboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/poll-cursor" \
-H "Authorization: Bearer $TOKEN"Poll from the beginning
delete/api/workflows/{id}/poll-cursor
Resets the polling trigger, like resetting a Mirth channel: forgets the cursor, the item ids remembered at it and the workflow's settled polling duplicate receipts, so the next poll (due at once) runs every item the source returns, including items that already ran. A poll in progress is never interrupted: 409 POLL_IN_PROGRESS, try again in a few seconds. 409 CONFLICT when the deployed trigger is not polling. A workflow that has not polled yet answers reset: false. Operators and admins. Audited as workflow.poll_reset with the number of receipts forgotten. Rate limited to 10 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: resetWorkflowPollCursor
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200Reset (or nothing to reset).
Response fields
application/json · object
resetbooleanforgotteninteger
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X DELETE "$ENGINE_URL/api/workflows/<id>/poll-cursor" \
-H "Authorization: Bearer $TOKEN"A polling workflow's recent polls
get/api/workflows/{id}/polls
The workflow's newest polls (at most 100), newest first, whether or not they found new items: when each ran, its outcome (ok; failed, waiting or skipped with the kind of cause), how long it took, how many items it read and over how many pages, how many were new, how many runs it started, how many had run before, how many the inbound filter rejected, and whether the cursor moved. Counts and cause classes only: never the cursor value, an item or error text, so viewers read it too. call links to the connection's call-log row of the poll's read (masked request and response) while that log, which keeps its connection's calls for CALL_LOG_RETENTION_HOURS (default 7 days), still holds it. Polls are recorded in the engine event log; recording is false when it, or its trigger family, is turned off (EVENT_LOG_ENABLED, EVENT_LOG_FAMILIES). Workspace-scoped. Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowPolls
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
limit | query | integer | How many polls, 1 to 100 (default 100). |
Responses
- 200The polls.
Response fields
application/json · object
pollingbooleanThe deployed trigger is polling.
recordingbooleanPolls are being recorded on this engine.
intervalMsinteger | nullThe trigger's poll interval.
pollsarray of object13 fields
atstring (date-time)outcomestringOne of: "ok", "failed", "waiting", "skipped"
causestring | nullOne of: "read", "unordered", "stalled", "item", "in-flight", "backlog", "license", "phi"
durationMsinteger | nullitemsintegerItems the read returned, every page.
pagesintegernewItemsintegerItems not run before, taken this poll.
ranintegerRuns started.
alreadyRunintegerItems that ran on an earlier poll.
filteredintegerItems the inbound filter rejected.
cursorMovedbooleanfirstPollbooleancallobject | null3 fields
profileIdstringidstringenvstringOne of: "production", "sandbox"
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/polls" \
-H "Authorization: Bearer $TOKEN"List saved test cases
get/api/workflows/{id}/test-cases
The workflow's saved test cases, which the deploy checklist dry-runs. The list carries no case content (inputs are PHI), so viewers and operators get the same list.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listWorkflowTestCases
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The cases.
Response fields
application/json · object
testCasesarray of WorkflowTestCasemaxintegerAt most 50 cases per workflow.
canEditboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/test-cases" \
-H "Authorization: Bearer $TOKEN"Save a test case
post/api/workflows/{id}/test-cases
Saves an input message (up to 1 MB) and, optionally, what the workflow should produce from it: the whole output, compared field by field, and/or assertions over the output's fields. A case with neither passes when the dry run reaches a destination. A step case (stepIds, from Run with sample) must fit the saved workflow by the same selection rules as a step test, or the request is a 400 with the reason. Input and expected are stored AES-256-GCM encrypted. 409 at 50 cases or on a duplicate name. Audited as workflow.test_case_created with the name only.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: createWorkflowTestCase
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
namestringrequired1 to 80 characters, unique in the workflow.
inputstringThe input message. Give exactly one of this,
fromExecutionIdorfromSample.fromSamplebooleantrue: the workflow's saved sample becomes the input, read on the server (auditedworkflow.sample_read) so it never goes through the browser. 400 when there is no saved sample.fromExecutionIdstringA run of this workflow whose message as received becomes the input, read on the server (Runs › Save as test case). 404 for a run of another workflow, 400 for a run without a message.
expectedobject | null3 fields
outputstring | objectThe whole expected output, compared field by field.
2 fields
option 1stringoption 2object
assertionsarray of object3 fields
fieldstringrequiredAn output field:
SEG.nfor HL7v2, a dotted path for JSON.opstringrequiredOne of: "equals", "exists", "absent", "contains"
valuestring | integer | boolean
stepOutputsobjectA step case (Run with sample): each step's expected output, by step id.
stepIdsarray of stringRun with sample: test only these steps (connected, starting from one step). Each step's output is compared with
expected.stepOutputs.fromRealMessagebooleanThe input is a real message, so the case's read is masked. Default true; send false for a bundled or pasted sample.
startAtstringWith stepIds: message (default; the steps before run first) or step-input (the input is the first step's input).
Responses
- 201Saved.
Response fields
application/json · object
testCaseWorkflowTestCase
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/test-cases" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"input": "string",
"fromSample": true,
"fromExecutionId": "string",
"expected": {
"output": "string",
"assertions": [
{
"field": "string",
"op": "equals",
"value": "string"
}
],
"stepOutputs": {}
},
"stepIds": [
"string"
],
"fromRealMessage": true,
"startAt": "string"
}'Get a test case
get/api/workflows/{id}/test-cases/{caseId}
One case with its input and expected (an audited read). A case pinned from a real message (fromRealMessage) comes back masked (HL7 patient fields such as PID.3, PID.5 and PID.7; every JSON and FHIR value but resourceType), with masked: true, unless the request carries phi=reveal and a reason; that reveal is audited as phi.revealed (resourceType test_case, the reason only). Viewers get the summary only, with redacted: true (G32).
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowTestCase
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
caseIdrequired | path | string | Test case id. |
phi | query | string |
|
reason | query | string | Why PHI is shown: troubleshooting, patient-request or audit. |
Responses
- 200The case.
application/json · object
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/test-cases/<caseId>" \
-H "Authorization: Bearer $TOKEN"Change a test case
put/api/workflows/{id}/test-cases/{caseId}
Changes the name, input or expected. assertions (the builder's field checks, at most 100) replaces only the case's assertions and keeps its expected output and step outputs; give it or expected, not both, and an empty list removes them. On a case from a real message, a value that still holds a masked read (•••) is a 400. Audited as workflow.test_case_updated with the name and the changed field names (assertions, with assertionCount), never values.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: updateWorkflowTestCase
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
caseIdrequired | path | string | Test case id. |
Request body (required)
application/json · object
namestringinputstringexpectedobject | null3 fields
outputstring | objectThe whole expected output, compared field by field.
2 fields
option 1stringoption 2object
assertionsarray of object3 fields
fieldstringrequiredAn output field:
SEG.nfor HL7v2, a dotted path for JSON.opstringrequiredOne of: "equals", "exists", "absent", "contains"
valuestring | integer | boolean
stepOutputsobjectA step case (Run with sample): each step's expected output, by step id.
assertionsarray of objectReplaces only the field checks; the expected output stays.
3 fields
fieldstringrequiredAn output field:
SEG.nfor HL7v2, a dotted path for JSON.opstringrequiredOne of: "equals", "exists", "absent", "contains"
valuestring | integer | boolean
Responses
- 200Saved.
Response fields
application/json · object
testCaseWorkflowTestCase
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/workflows/<id>/test-cases/<caseId>" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"input": "string",
"expected": {
"output": "string",
"assertions": [
{
"field": "string",
"op": "equals",
"value": "string"
}
],
"stepOutputs": {}
},
"assertions": [
{
"field": "string",
"op": "equals",
"value": "string"
}
]
}'Delete a test case
delete/api/workflows/{id}/test-cases/{caseId}
Audited as workflow.test_case_deleted.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: deleteWorkflowTestCase
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
caseIdrequired | path | string | Test case id. |
Responses
- 200Deleted.
Response fields
application/json · object
deletedboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X DELETE "$ENGINE_URL/api/workflows/<id>/test-cases/<caseId>" \
-H "Authorization: Bearer $TOKEN"Run the saved test cases
post/api/workflows/{id}/test-cases/run
Dry-runs every saved case against the live version, the same path as a builder dry run, so nothing is delivered or stored. With graph, the cases run on the builder's unsaved edits instead (the builder re-runs them as you edit), audited with unsaved: true once per person and workflow every 10 minutes, with coalescedRuns counting the runs the previous row folded in. Results carry field names, counts and, for a step case, the ids of the steps it found broken (brokenStepIds), never values. Audited as workflow.test_cases_run with the version and counts. Operators and admins only. Rate limited to 10 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: runWorkflowTestCases
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
graphobjectOptional. The editor's graph: { trigger, nodes, edges, startNodeId }.
Responses
- 200The results.
application/json · WorkflowTestCasesRun
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/test-cases/run" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"graph": {}
}'Count the values of one HL7 field
get/api/workflows/{id}/field-values
Value counts for one HL7 field across the workflow's most recent executions, for the builder's rule preview. Messages are PHI, so the response holds only counts for the field you ask for, is never cached, and the audit log records the path, not the values. The counts are message content, so viewers get 403 PHI_FORBIDDEN (G32). The values are masked by default (phiMasked: true), as the field's raw line would show them: names keep initials, ids two characters, a code field such as PV1.2 as it is; one row per distinct value even when two masks read the same. With phi=reveal&reason= they are served as they are, after phi.revealed is written (the reason, part: "field-values", the path, the messages' patient keys, never a value); a reveal that can't be recorded serves nothing (500 PHI_REVEAL_NOT_RECORDED), a bad reason is a 400 and a viewer's reveal a 403 PHI_REVEAL_FORBIDDEN.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowFieldValues
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
pathrequired | query | string | A field path such as |
limit | query | integer | Executions to read, 1 to 500. |
phi | query | string |
|
reason | query | string | Why PHI is shown, with |
grant | query | string | With |
Responses
- 200The counts.
Response fields
application/json · object
pathstringlimitintegermessagesintegervaluesarray of object2 fields
valuestringcountinteger
otherValuesintegerotherCountintegerphiMaskedbooleanTrue when the values are masked.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/field-values?path=string" \
-H "Authorization: Bearer $TOKEN"Per-step results of the latest run
get/api/workflows/{id}/last-run
Status and duration of each step of the newest execution, and the branch a condition took. Step output and error text can hold PHI, so neither is returned. A condition branch depends on the message, so viewers get branch: null and redacted: true (G32).
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowLastRun
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The latest run, or `execution: null`.
Response fields
application/json · object
executionobject | null4 fields
idstringstatusstringstartedAtstring (date-time)durationMsinteger
stepsarray of object4 fields
nodeIdstringstatusstringdurationMsintegerbranchstring
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/last-run" \
-H "Authorization: Bearer $TOKEN"Step latency percentiles
get/api/workflows/{id}/slow-steps
p50, p95, p99 and max duration of each step over the most recent executions. Cached for 60 seconds.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowSlowSteps
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
sampleSize | query | integer | Executions to sample. |
Responses
- 200The percentiles.
Response fields
application/json · object
workflowIdstringsampledExecutionsintegerstepsarray of object7 fields
nodeIdstringnodeNamestringp50Durationnumberp95Durationnumberp99DurationnumbermaxDurationnumbersampleCountinteger
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/slow-steps" \
-H "Authorization: Bearer $TOKEN"Slowest step of each workflow
get/api/workflows/slow-steps-summary
For each workflow (up to 200), the step with the highest p95 latency over its last 20 executions. Cached for 60 seconds.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getSlowStepsSummary
Responses
- 200The summary.
Response fields
application/json · object
workflowsarray of object6 fields
workflowIdstringworkflowNamestringslowestStepNamestringslowestStepP95MsnumberexecutionCountintegerlastExecutionAtstring (date-time)
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/slow-steps-summary" \
-H "Authorization: Bearer $TOKEN"Import a community template
post/api/workflows/import-marketplace
Fetches the template with this slug from medhook.dev (WEB_APP_URL), checks it, and creates a new workflow in this engine.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: importMarketplaceWorkflow
Request body (required)
application/json · object
slugstringrequiredLowercase letters and digits joined by dashes or single dots.
Responses
- 200Imported.
Response fields
application/json · object
successbooleanworkflowWorkflowsourceobject2 fields
marketplacebooleanslugstring
warningsarray of string
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 422The request is well formed but cannot be processed.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/import-marketplace" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slug": "string"
}'Preview a transform pipeline
post/api/transforms/preview
Runs a flat object through the visual transform builder's operations one step at a time and returns each step's output, so the builder can show a card per step. Rate limited to 30 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: previewTransforms
Request body (required)
application/json · object
inputobjectrequiredA flat data object.
operationsarray of objectrequiredThe builder's operations, in order.
Responses
- 200The steps.
Response fields
application/json · object
stepsarray of object7 fields
indexintegeropTypestringlabelstringsummarystringoutputobject | nullerrorstring | nullskippedboolean
finalOutputobject | null
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/transforms/preview" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"input": {},
"operations": [
{}
]
}'Make or find the checklist's practice workflow
post/api/users/me/onboarding/practice
The first-run checklist's practice workflow, Demo ADT intake: disabled and synthetic (Demo Health, no PHI). An MLLP trigger with a source filter for ADT A01, A04 and A08, a map to FHIR Patient and Encounter, and one destination, a JavaScript Writer that only answers, so nothing is delivered; its saved sample is a bundled synthetic ADT^A01. Made once per workspace, under an id derived from the workspace (the destination's JavaScript Writer profile too, in the same transaction): 201 when this call made it, audited as workflow.created with source: practice (and adapter_profile.created when it made the profile); 200 with the same id after that. No body. Rate limited to 20 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: createPracticeWorkflow
Responses
- 200The workspace already has it.
Response fields
application/json · object
idstringcreatedbooleanAlways false here.
- 201Made by this call.
Response fields
application/json · object
idstringcreatedbooleanAlways true here.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/users/me/onboarding/practice" \
-H "Authorization: Bearer $TOKEN"First-run checklist
get/api/users/me/onboarding
The caller's first-run checklist on the Workflows list, in the caller's workspace: five steps in order (tunnel, sample, build, test, deploy). tunnel: a ready tunnel. sample: a workflow other than the practice workflow with a saved sample message (counted by presence only), or the mark. build: the mark (the practice workflow opened from the card). test: the mark (a test run of the practice workflow sets it), or a stored run of it. deploy: a deployed workflow. Marks are stored per person and workspace. No message content. Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getOnboarding
Responses
- 200The checklist.
Response fields
application/json · object
dismissedbooleanThe person hid the card (Help reopens it).
doneintegerSteps done.
totalintegerAlways 5.
stepsarray of object2 fields
idstringOne of: "tunnel", "sample", "build", "test", "deploy"
doneboolean
practiceWorkflowIdstring | nullThe practice workflow Demo ADT intake the card opens; null until someone made it (POST /api/users/me/onboarding/practice).
tunnelobject | nullThe oldest ready tunnel, or null.
2 fields
namestringpeerIpstring
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/users/me/onboarding" \
-H "Authorization: Bearer $TOKEN"Hide, reopen or mark the first-run checklist
put/api/users/me/onboarding
The caller's first-run checklist on the Workflows list, in the caller's workspace: five steps in order (tunnel, sample, build, test, deploy). tunnel: a ready tunnel. sample: a workflow other than the practice workflow with a saved sample message (counted by presence only), or the mark. build: the mark (the practice workflow opened from the card). test: the mark (a test run of the practice workflow sets it), or a stored run of it. deploy: a deployed workflow. Marks are stored per person and workspace. No message content. dismissed hides or reopens the card; mark records a step taken from it. Audited as onboarding.updated. Rate limited to 60 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: updateOnboarding
Request body (required)
application/json · object
dismissedbooleanmarkstringOne of: "sample", "build", "test"
Responses
- 200The checklist after the change.
Response fields
application/json · object
dismissedbooleanThe person hid the card (Help reopens it).
doneintegerSteps done.
totalintegerAlways 5.
stepsarray of object2 fields
idstringOne of: "tunnel", "sample", "build", "test", "deploy"
doneboolean
practiceWorkflowIdstring | nullThe practice workflow Demo ADT intake the card opens; null until someone made it (POST /api/users/me/onboarding/practice).
tunnelobject | nullThe oldest ready tunnel, or null.
2 fields
namestringpeerIpstring
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/users/me/onboarding" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"dismissed": true,
"mark": "sample"
}'Read an API description (New workflow)
post/api/specs/import
Send exactly one of source, doc or url. doc is always read as the document's text and url always fetched; source is told apart: an OpenAPI 3.x or Swagger 2.0 document (JSON or YAML), a Postman collection (v2.x), a curl command, or an https URL of an OpenAPI document (an http URL is a 400). A URL is fetched with every redirect followed only after its hop is checked against private and internal addresses (10 s; a body over 5,242,880 bytes, by Content-Length or as it streams, is a 400 and the rest is not read; a failed fetch is 502 FETCH_FAILED). Only local $ref values are read; a remote one is a 400. Nothing is stored. Audited as api_spec.imported with the format, the endpoint count and whether it came from a URL. Rate limited to 30 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: importApiSpec
Request body (required)
application/json · object | object | object
Responses
- 200What the wizard shows.
Response fields
application/json · object
formatstringrequiredOne of: "openapi-3", "swagger-2", "postman", "curl"
titlestringrequiredThe document's title (a curl command: its host).
endpointsarray of objectrequiredAt most 50, in document order.
2 fields
methodstringpathstring
totalintegerrequiredEvery endpoint in the document.
authstringrequiredOne label:
OAuth2 client credentials,OAuth2 authorization code,OAuth2,OpenID Connect,API key,Bearer token,Basic authorNo auth.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
- 502Error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/specs/import" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"source": "string"
}'Mint a capture URL (New workflow)
post/api/capture
A one-time URL to point a sender at; its first request becomes the wizard's sample. secret is what the sender may sign with (HMAC-SHA256 hex in X-Hub-Signature-256 or X-Webhook-Signature, or Standard Webhooks); it is returned once and not audited. The capture URL expires after 15 minutes; a request it received is kept for 15 minutes from its arrival, then dropped. Audited as capture.created. Rate limited to 20 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: createCapture
Request body
application/json · object
Responses
- 200The capture.
Response fields
application/json · object
idstringrequiredc-and 32 hex characters.urlstringrequiredWhere the sender posts: /api/capture-intake/{id}.
secretstringrequiredHMAC secret for signing the request.
expiresAtstring (date-time)required
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/capture" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Wait for the captured request (SSE)
get/api/capture/{id}/stream
Server-sent events: {"type":"waiting"} until the request arrives, then {"type":"captured","request":{method,path,bytes,contentType,hmacValid,body,receivedAt,masked,captureId}} and the stream closes; {"type":"expired"} if the capture runs out first. hmacValid is true (signed with the capture's secret), false (a bad signature) or null (unsigned). No header is pushed (a custom header or a referer can carry PHI); credential and signature headers are not kept at all. body is masked (masked: true): names, identifiers, birth dates and contact details in JSON, HL7 per field, any other text not shown; the raw body stays in Redis for 15 minutes from its arrival and is saved as a draft's sample with PUT /api/workflows/{id}/sample { captureId }. Only the person who minted the capture, in its workspace, can open it (404 otherwise). Delivering the request is audited as capture.read.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: streamCapture
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The capture id. |
Responses
- 200An event stream.
text/event-stream · string
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/capture/<id>/stream" \
-H "Authorization: Bearer $TOKEN"Send the request to capture
post/api/capture-intake/{id}
Where the sender posts, once. No engine credential: the unguessable, expiring capture id is the credential. Any body up to 262,144 bytes (413 BODY_TOO_LARGE over); 404 for an unknown or expired capture; 409 ALREADY_CAPTURED after the first request. Audited as capture.received with the size and the HMAC verdict, never the body. Rate limited to 30 requests per minute.
Auth: None, public route · Operation: sendCaptureRequest
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The capture id. |
Request body (required)
*/* · string
Responses
- 200Captured.
Response fields
application/json · object
capturedboolean
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 413The body is larger than the limit.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/capture-intake/<id>" \
-H "Content-Type: */*" \
--data-binary @bodyWorkflow overview
get/api/workflows/{id}/overview
The workflow home's Overview for the last 24 h: key figures (messages, errors, p95 end to end, runs with a retry, this workflow's ACK queue items), 24 hourly buckets with their failures, the steps in run order with their count, p95 and errors, the open issue (failures grouped by the step they failed at, with a suggested next step), the 6 newest runs and the source. Counts and states only: no message content and no error text. The window is cached for 60 s per saved workflow; the newest runs are read live. Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowOverview
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The overview.
Response fields
application/json · object
workflowIdstringgeneratedAtstring (date-time)kpisobject5 fields
messagesintegerRuns in the last 24 h.
errorsintegerFailed (or partly failed) runs in the last 24 h.
p95Msinteger | nullp95 run time end to end in ms; null when idle.
retriesintegerRuns where a step needed a retry.
ackQueueinteger | nullThis workflow's items in the ACK queue; null when it could not load or its scan cap cut the window short.
hourlyarray of object24 buckets on clock hours, oldest first; the last is the hour now is in (still filling).
3 fields
startstring (date-time)totalintegerfailedinteger
stepsarray of objectIn run order, as the builder lists them.
17 fields
idstring"trigger" or the node id.
nodeIdstring | nullnumberstringThe builder's step number, e.g. "1", "3", "5a".
kindstringe.g. "Trigger", "Filter", "Data map", "Destination".
rolestringOne of: "trigger", "filter", "map", "destination", "source", "step"
titlestringThe step's label.
countintegerRuns that reached the step in the window.
p95Msnumber | nullp95 step duration in ms; null with no timed result.
errorsintegerRuns that failed at the step.
retriesintegerRuns where the step needed a retry.
lastStatusstring | nullThe step's newest result; null when idle.
branchobject | nullDestinations only: the router branch the step is on.
2 fields
labelstringThe router edge's label, e.g. "Admit".
everybooleanThe branch has no filter of its own: every message.
queuedbooleanDestinations only: the send is queued (destination queue).
queueDepthinteger | nullDestinations only: queued deliveries; null when not queued or it could not load.
firstStatusinteger | nullThe one retried run's first failing HTTP status (destinations only, when exactly one run retried).
finalStatusinteger | nullThat run's final HTTP status.
lastFixstringWhen the newest result failed: the ACK queue's next step. Never the error text.
openIssueobject | nullThe biggest group of the window's open failures by the step they failed at and their error code; null when none is open. A failure a later retry or replay delivered, or one discarded from the ACK queue, is resolved and left out.
11 fields
nodeIdstring | nullstepNumberstring | nullstepTitlestring | nullcountintegerFailed runs in the group.
firstAtstring (date-time)lastAtstring (date-time)fixstringThe ACK queue's suggested next step for the newest failure. Never the error text.
executionIdstringThe newest failed run (View runs and Replay in builder).
causeobject | nullA code table miss's structured cause; null for any other failure (fix says what to do).
6 fields
codestringOne of: "code_table_miss"
tablestringThe code table, from the step's config.
fieldstring | nullThe configured field that failed.
labelstringThe field as a name, e.g. "Ward code".
keystring | nullThe value that had no entry, read from the failed step's input; null for a PHI path or when it could not be read.
sameKeybooleanEvery failure in the group was read and had this key.
fixVersioninteger | nullThe newest undeployed version whose diff against the live one changes the failing step; null when none.
cappedbooleanPresent when the failures read hit their cap (500): count is a floor.
One of: true
recentRunsarray of objectThe 6 newest runs, any age.
8 fields
idstringstartedAtstring (date-time)statusstringcontrolIdstring | nullMSH-10 or the X12 control number.
typestring | nulle.g. "ADT^A08".
msinteger | nullRun time in ms; null while it runs.
retriedbooleanA step needed a retry.
filteredbooleanCompleted without reaching a destination.
sourceobject6 fields
typestringThe trigger type.
titlestringe.g. "MLLP listener".
subtitlestringe.g. ":2575 via demo-adt".
listeningboolean | nullWhether a listening trigger is on; null for a trigger that does not wait for messages.
lastMessageAtstring (date-time) | nulltunnelobject | null3 fields
namestringupboolean | nullupSincestring (date-time) | nullUp since (the tunnel watcher); null when unknown.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/overview" \
-H "Authorization: Bearer $TOKEN"Workflow runs
get/api/workflows/{id}/runs
The workflow home's Runs tab: the workflow's runs over the last 24 h, newest first, with the chip counts (all, failed, retried, filtered; cached for 60 s). result narrows the rows. q matches a run id prefix, the message control id or, for callers who may see PHI, the MRN, through the message-search lookup columns; a search is audited as message.searched with the field searched, never the value. Rows carry no message content and no error text. Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listWorkflowRuns
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
result | query | string | all (default), failed, retried or filtered. |
q | query | string | Run id prefix, message control id or MRN (1-100 characters). |
cursor | query | string |
|
limit | query | integer | 1-100, default 50. |
Responses
- 200A page of runs.
Response fields
application/json · object
workflowIdstringwindowHoursintegerThe window the rows and counts cover (24).
countsobject | nullThe chip counts over the window, cached for 60 s; null when they could not load.
4 fields
allintegerfailedintegerFailed or partly failed runs.
retriedintegerRuns where a step needed a retry.
filteredintegerCompleted runs that reached no destination.
runsarray of objectNewest first.
8 fields
idstringstartedAtstring (date-time)controlIdstring | nullMSH-10 or the X12 control number.
typestring | nulle.g. "ADT^A08".
eventstring | nullThe trigger event, e.g. "A08".
routearray of stringThe destinations the run delivered to, in step order.
resultobject2 fields
kindstringOne of: "ok", "retry", "err", "skip", "live", "off"
labelstringe.g. "Delivered · Epic 201, GCS" (each destination reached, with its final HTTP status where it has one), "Delivered on retry 2 · Epic 503 first", "Failed at 3 · no entry for 5E" (a code table miss's key; "no code-table entry" at a PHI path), "Failed at 3 · Location → facility", "Filtered · A03 not routed", "Running".
msinteger | nullRun time in ms; null while it runs.
nextCursorstring | nullPass as
cursorfor the next page.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/runs" \
-H "Authorization: Bearer $TOKEN"Workflow run detail
get/api/workflows/{id}/runs/{runId}
One run of the workflow for the Runs side panel: the row, the trace, the failed step with a suggested next step (never the error text), the message as received with its PHI masked (no raw PHI; viewers get none), the ACK, the version and engine it ran on, and calledBy (the run that called this one through a Call workflow step and its workflow, ids only so viewers get it too; null when nothing called it or the caller is gone). 404 for a run of another workflow or workspace. Audited as execution.viewed. With phi=reveal and a reason, an operator or admin also gets the message unmasked as message.revealed; the request is audited instead as one phi.revealed event on the execution (the reason and a keyed hash of each patient id in PID-3 and MRG-1, at most 200 with the rest counted as patientsOmitted, never a value; none for a body that isn't HL7 v2; revealed: false for a run with no recorded message), written before anything is returned (500 PHI_REVEAL_NOT_RECORDED and no message when it can't be, as on Messages). A bad phi or reason is a 400 and a viewer's reveal a 403 (PHI_REVEAL_FORBIDDEN). Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowRun
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
runIdrequired | path | string | Execution id. |
phi | query | string |
|
reason | query | string | Why PHI is shown; required with |
Responses
- 200The run.
Response fields
application/json · object
idstringstartedAtstring (date-time)controlIdstring | nullMSH-10 or the X12 control number.
typestring | nulle.g. "ADT^A08".
eventstring | nullThe trigger event, e.g. "A08".
routearray of stringThe destinations the run delivered to, in step order.
resultobject2 fields
kindstringOne of: "ok", "retry", "err", "skip", "live", "off"
labelstringe.g. "Delivered · Epic 201, GCS" (each destination reached, with its final HTTP status where it has one), "Delivered on retry 2 · Epic 503 first", "Failed at 3 · no entry for 5E" (a code table miss's key; "no code-table entry" at a PHI path), "Failed at 3 · Location → facility", "Filtered · A03 not routed", "Running".
msinteger | nullRun time in ms; null while it runs.
workflowIdstringstatusstringtracearray of objectThe trigger, then each step in the order it ran, then (after a failure) the next steps that never ran.
6 fields
nstringThe builder's step number, e.g. "1", "3", "5a".
titlestringstatusstringOne of: "ok", "err", "retry", "skip", "no", "live"
offsetMsintegerWhen the step started, in ms after the run started.
msinteger | nullHow long it took; null when it never ran.
retriesinteger
failureobject | null5 fields
stepNumberstring | nullstepTitlestring | nullfixstringThe ACK queue's suggested next step. Never the error text.
causeobject | nullA code table miss: the table and field from the step's config, never from the error text.
4 fields
codestringOne of: "code_table_miss"
tablestringThe code table the step looks up.
labelstringThe field that failed, in words, e.g. "Ward code".
keystring | nullThe value looked up, read from the failed step's input; null at a PHI path (never read) or when it could not be read.
nackstring | nullThe NACK the sender got (MLLP trigger answering once the run settles); null when none was sent.
One of: "AE", "AR"
messageobject3 fields
maskedstring | nullrequiredThe HL7 v2 message as received with its patient fields masked; null for viewers, for a run without a message and for a body that is not HL7 v2.
reasonstringOne of: "viewer", "not-hl7", "none"
revealedstringThe message as received, unmasked. Only on an audited
phi=revealrequest, and only when a message was recorded (an HL7 v2 body or one that is not HL7 v2).
ackstring | nullThe HL7 ACK the sender got: "AA" (always in accept mode), or e.g. "AE · step 3 failed"; null while it runs or when the message did not come in over MLLP.
ranOnobject2 fields
versioninteger | nullThe version live when the run started.
enginestring | nullThe engine instance that ran it.
calledByobject | null2 fields
executionIdstringThe run whose Call workflow step started this one.
workflowIdstringThat run's workflow (its Runs tab opens it).
queueMsinteger | nullReceived to started in ms: how long the run waited to be picked up (the old execution page's Queue Time). Null while pending, for a run cancelled before a claim, or for rows written before the received time was kept.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/runs/<runId>" \
-H "Authorization: Bearer $TOKEN"A step's errors in the last 24 hours
get/api/workflows/{id}/step-errors
The step editor's Errors · last 24 h: the step's failures in failed runs of the workflow from the last 24 hours, newest first, at most 20 (the 200 newest failed runs are looked at). Error text can quote the message, so a viewer gets [redacted] in its place; the times, execution ids, control ids and message types stay. Everyone else gets it masked by default (phiMasked: true; names, ids, dates and message values as •••, field paths and codes kept): the masked read is not audited. With phi=reveal&reason= the text is served as it is, after phi.revealed is written (the reason, part: "step-errors", the step, the failed runs' patient keys, never a value); a reveal that can't be recorded serves nothing (500 PHI_REVEAL_NOT_RECORDED), a bad reason is a 400 and a viewer's reveal a 403 PHI_REVEAL_FORBIDDEN.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowStepErrors
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
nodeIdrequired | query | string | The step's node id (letters, digits, _ . : -; up to 200). |
phi | query | string |
|
reason | query | string | Why PHI is shown, with |
grant | query | string | With |
Responses
- 200The step's recent errors.
Response fields
application/json · object
windowHoursintegerAlways 24.
phiMaskedbooleanTrue when the errors are masked.
errorsarray of object5 fields
executionIdstringThe failed run (Use as input, Replay).
atstring (date-time)When the step failed.
errorstringThe step's error, or [redacted] for a viewer.
messageIdstring | nullThe message control id (MSH-10), or null on a sealed row.
messageTypestring | nullThe message type (MSH-9), or null.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/step-errors?nodeId=string" \
-H "Authorization: Bearer $TOKEN"The last real input at a step
get/api/workflows/{id}/step-recent-input
The step editor's Recent · PHI: the newest message run of the workflow that reached the step, and the input that step recorded, as path → value fields. Values are masked by default; the message header and event stay readable. Every read is audited as message.viewed (ids only). phi=reveal with a reason returns the values unmasked after a phi.revealed event (reason only) is recorded; if it can't be recorded, nothing is revealed (500). Viewers get no values (redacted: true) and a reveal answers 403. Only the workflow's 200 newest runs of any kind are looked at, manual and test runs included, so a workflow mostly run by hand can answer recent: null although a real message reached the step further back.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowStepRecentInput
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
nodeIdrequired | query | string | The step's node id (letters, digits, _ . : -; up to 200). |
phi | query | string |
|
reason | query | string | Why PHI is shown; required with phi=reveal. |
Responses
- 200The step's last input, or null when no message reached it.
Response fields
application/json · object
recentobject | null7 fields
executionIdstringThe run (what Run step runs).
atstring (date-time)When the run started.
typestring | nullThe message type (MSH-9), or null.
controlIdstring | nullThe message control id, or null on a sealed row.
inputmap of stringPath → value; masked unless revealed, empty for a viewer.
maskedbooleanThe values are masked.
redactedbooleanA viewer: no values.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/step-recent-input?nodeId=string" \
-H "Authorization: Bearer $TOKEN"A workflow's newest runs, for the builder's Input picker
get/api/workflows/{id}/recent-runs
The builder Input picker's Recent messages and Executions: the workflow's newest runs, newest first (6 by default, at most 20), each with its time, status, message type, control id (null on a sealed row) and, for a failed run, the step that failed. No message content, so the read is not audited and viewers get the same rows. Running one as a test input is audited by test-steps (message.viewed); its recorded trace comes from GET /api/executions/{id} (execution.viewed).
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowRecentRuns
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
limit | query | integer | How many runs (1-20, default 6). |
Responses
- 200The workflow's newest runs.
Response fields
application/json · object
runsarray of object6 fields
idstringThe execution id (Use as input, Replay).
atstring (date-time)When the run started.
statusstringpending, running, completed, failed, …
typestring | nullThe message type (MSH-9), or null.
controlIdstring | nullThe message control id (MSH-10), or null.
failedNodeIdstring | nullThe step a failed run stopped at, or null.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/recent-runs" \
-H "Authorization: Bearer $TOKEN"Per-step traffic over the last 24 hours
get/api/workflows/{id}/node-stats
The Graph canvas's Live · 24 h overlay: for each step, how many runs of the workflow went through it in the last 24 hours, how many of them failed there, and its p95 time in ms. At most the 20,000 newest runs in the window are looked at (capped says when there were more). Counts and times only, no message content, so the read is not audited and viewers get the same answer. Cached for 60 s.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowNodeStats
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
window | query | string | The window; only 24h (the default). |
Responses
- 200Each step's traffic in the window.
Response fields
application/json · object
windowstringAlways 24h.
sincestring (date-time)The window's start.
runsintegerRuns looked at in the window.
cappedbooleanThe window held more runs than were looked at.
nodesarray of object4 fields
nodeIdstringThe step's node id.
countintegerRuns that went through the step.
errorsintegerOf those, runs where the step failed.
p95Msnumber | nullThe step's p95 time in ms, or null.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/node-stats" \
-H "Authorization: Bearer $TOKEN"The workflow's environment
get/api/workflows/{id}/environment
The deploy target: each connection the workflow's steps use calls this environment's URL and credentials. Lists those connections with the environments each has. Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowEnvironment
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Responses
- 200The environment.
Response fields
application/json · object
environmentstringOne of: "production", "sandbox"
connectionsarray of objectThe connections the workflow's steps use.
3 fields
idstringnamestringenvironmentsarray of string
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/environment" \
-H "Authorization: Bearer $TOKEN"Set the workflow's environment
put/api/workflows/{id}/environment
Switches the deploy target from the next run on. 409, with missing (connection names), while a connection the workflow uses has no such environment: a run never falls back to the other one. Audited as workflow.environment_changed. Rate limited to 20 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: setWorkflowEnvironment
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Workflow id. |
Request body (required)
application/json · object
environmentstringrequiredOne of: "production", "sandbox"
Responses
- 200The environment after the change.
Response fields
application/json · object
environmentstringOne of: "production", "sandbox"
connectionsarray of objectThe connections the workflow's steps use.
3 fields
idstringnamestringenvironmentsarray of string
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X PUT "$ENGINE_URL/api/workflows/<id>/environment" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"environment": "production"
}'A draft's MLLP listener
get/api/workflows/{id}/listener
The listener a never-deployed workflow opened, with how many messages it holds for the first deploy (counted only while one is open); listener is null when none is. With tunnelId, tunnel names that tunnel and its sender (what the builder's confirm shows). A read: not audited.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getWorkflowListener
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The draft workflow's id. |
tunnelId | query | string | A tunnel to name, for the confirm. |
Responses
- 200The listener (or null) and the tunnel (or null).
Response fields
application/json · object
listenerobject | nullrequired9 fields
workflowIdstringrequiredThe draft.
portintegerrequiredThe MLLP port it listens on.
listenerstringrequiredThe Helm-declared listener on that port (mllp.listeners).
tunnelIdstring | nullrequiredThe tunnel the sender delivers through.
tunnelNamestring | nullrequiredThe tunnel's name.
senderstring | nullrequiredWho delivers: the tunnel's healthcare organization, else its name.
openedBystring | nullrequiredWho opened it.
openedAtstring (date-time)requiredWhen, ISO 8601.
heldintegerrequiredMessages held for the first deploy.
tunnelobject | nullrequired3 fields
idstringrequirednamestringrequiredsenderstringrequiredThe tunnel's healthcare organization, else its name.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/workflows/<id>/listener" \
-H "Authorization: Bearer $TOKEN"Open an MLLP listener for a draft
post/api/workflows/{id}/listener
Routes the Helm-declared MLLP listener on port to a workflow that was never deployed. From then on what arrives on that port and passes the draft's trigger (message types, filter) is answered AA and held: stored with status held_for_deploy, not run, nothing delivered. The first deploy (POST /api/workflows/{id}/deploy) runs the held messages on the deployed version, each sender's in arrival order, and closes this listener. Deleting the draft first keeps them with status filtered and the error "draft deleted before deploy". The engine opens no socket itself: a port Helm does not declare is a 422. 409 when the workflow is deployed, or another workflow's trigger or another draft already uses the port; 404 for a workflow or tunnel outside the workspace. Operators and admins (a viewer gets 403). Audited as listener.opened with approvedBy, port, tunnelId, listener and proposal; an Agent approval card's proposal is resolved done (GET /api/ai/proposals/{id}). Rate limited to 10 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: openWorkflowListener
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The draft workflow's id. |
Request body (required)
application/json · object
portintegerrequiredThe MLLP port.
tunnelIdstringrequiredThe tunnel the sender delivers through.
proposalstringThe Agent card this was opened from.
Responses
- 201Open.
Response fields
application/json · object
listenerobject9 fields
workflowIdstringrequiredThe draft.
portintegerrequiredThe MLLP port it listens on.
listenerstringrequiredThe Helm-declared listener on that port (mllp.listeners).
tunnelIdstring | nullrequiredThe tunnel the sender delivers through.
tunnelNamestring | nullrequiredThe tunnel's name.
senderstring | nullrequiredWho delivers: the tunnel's healthcare organization, else its name.
openedBystring | nullrequiredWho opened it.
openedAtstring (date-time)requiredWhen, ISO 8601.
heldintegerrequiredMessages held for the first deploy.
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 422The request is well formed but cannot be processed.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/workflows/<id>/listener" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"port": 1,
"tunnelId": "string",
"proposal": "string"
}'Close a draft's MLLP listener
delete/api/workflows/{id}/listener
Stops routing the port to the draft. Messages it already holds stay held until the first deploy runs them. 404 when none is open. Operators and admins. Audited as listener.closed. Rate limited to 10 requests per minute.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: closeWorkflowListener
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The draft workflow's id. |
Responses
- 200Closed.
Response fields
application/json · object
closedboolean
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X DELETE "$ENGINE_URL/api/workflows/<id>/listener" \
-H "Authorization: Bearer $TOKEN"Schemas
Named objects the operations above link to.
ApiError
The error body. error is always present. code is present on most errors and is the field to branch on; a few routes and the sign-in and role checks return only error (and sometimes detail).
errorstringrequiredHuman-readable error message.
codestringMachine-readable error code.
One of: "BAD_REQUEST", "INVALID_REQUEST", "UNAUTHORIZED", "UNAUTHENTICATED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "UNPROCESSABLE_ENTITY", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE", "NOT_CONFIGURED", "SIGNATURE_REQUIRED", "INVALID_SIGNATURE", "TIMESTAMP_REQUIRED", "TIMESTAMP_INVALID", "TIMESTAMP_OUT_OF_TOLERANCE", "INVALID_CREDENTIALS", "INVALID_TOKEN", "PAYLOAD_TOO_LARGE", "INVALID_NDJSON", "PHI_NOT_AUTHORIZED", "PHI_IN_SANDBOX", "IN_PROGRESS", "RETRY_SCHEDULED", "WORKFLOW_DISABLED", "CONFLICTING_SCOPE", "ALREADY_DELIVERED", "CHAIN_TOO_DEEP", "NO_FAILED_DESTINATION", "STALE_SCOPE", "UNKNOWN_DESTINATION", "NO_DESTINATIONS", "NOT_A_MESSAGE", "AI_FEATURES_DISABLED"
detailsanyOptional structured context about the error.
CursorPage
totalintegerrequiredNumber of items returned in this page.
nextCursorstring | nullrequiredPass this value as
cursorto retrieve the next page, or null if this is the last page.
DryRunResult
matchedbooleanrequiredFalse when the trigger's matching rules rejected the message.
reasonstringWhy it did not match.
statusstringOne of: "pending", "running", "completed", "partial", "failed", "cancelled", "waiting", "held_for_deploy", "filtered"
errorstring | nullstepsarray of objectrequired6 fields
nodeIdstringnodeNamestringstatusstringOne of: "pending", "running", "completed", "partial", "failed", "cancelled", "waiting", "held_for_deploy", "filtered"
errorstring | nulldurationMsinteger | nulldataany | nullThe step's output.
ErrorHandling
What a failed step does. Step retries wait in-process within one run, so each wait is capped at 60 s and the attempts at 10; longer waits are workflow retries (maxWorkflowRetries), which are durable.
strategystringrequiredOne of: "retry", "skip", "fail"
maxRetriesintegerretryDelaynumberMilliseconds before the first step retry.
backoffMultipliernumber
Execution
idstringrequiredgraphIdstringrequiredID of the workflow (WorkflowGraph) this execution belongs to.
graphNamestringstatusstringrequiredOne of: "pending", "running", "completed", "partial", "failed", "cancelled", "waiting", "held_for_deploy", "filtered"
startedAtstring (date-time)requiredcompletedAtstring (date-time)durationnumberWall-clock duration in seconds.
nodeResultsmap of NodeResultMap of node ID to its execution result. For a viewer every result's
datais null (G32).currentNodeIdstringerrorstringinputanyInput payload passed to the execution.
triggeredBystringtriggerDataanyRaw trigger payload (credentials masked). Message content (PHI): a viewer gets
{ redacted: true }instead (G32).redactedbooleanTrue when the caller is a viewer and the trigger data and node output were removed (G32).
FieldMapping
sourcestringrequiredJSON path ("$.name[0].family"; "[*]" reads every array item) or "hl7:" + an HL7 path ("hl7:PID.5.1", "hl7:OBX[*].5", "hl7:PID.3(2).1").
sourcesarray of stringConcatenate:
sourcethen each of these (one value each, no [*]); empty parts are skipped.separatorstringJoins
sources(default " ").targetstringrequiredTarget path. "hl7:PID.5.1" edits the HL7 text and needs config.mapMode "copy" on an HL7 input. In an hl7v2-to-fhir step (merge mode) the target names a resource: "Patient.name[0].family" or "Bundle.meta.tag[0].code".
transformstringLegacy single transform, run before
ops. "date" is HL7 DT/DTM to ISO 8601 (shape and offset kept); other text is read by JavaScript Date and written as a UTC ISO timestamp (text with no offset is read in the engine's time zone), as before value ops. A stored "custom" (a no-op) is dropped.One of: "uppercase", "lowercase", "trim", "date"
opsarray of ValueOpValue ops, in order, after the inline lookup and default. An op that cannot read its value is a row error (config.onRowError).
defaultstringUsed when the source is missing or empty.
lookupValuesarray of objectInline quick lookup: an unknown value gets
defaultwhen set, else passes through.3 fields
fromstringrequiredtostringrequirednotestring
lookupstringCode table name (applied last).
onMissingCodestringA value the
lookupcode table lacks: a row error (default), kept, ordefault(required with "default"). A missing table always fails.One of: "fail", "passthrough", "default"
NodeResult
nodeIdstringrequirednodeNamestringrequiredstatusstringrequiredOne of: "pending", "running", "completed", "partial", "failed", "cancelled", "waiting", "held_for_deploy", "filtered"
startedAtstring (date-time)requiredcompletedAtstring (date-time)durationnumberDuration in milliseconds.
dataanyOutput data produced by this node. A run stores an output once: an output equal to the run input or to an earlier step's is read back as that value. An output over
EXECUTION_NODE_RESULT_MAX_BYTESis{ __truncated: { bytes, sha256 } }(seedataTruncated).dataTruncatedbooleanThe output was over
EXECUTION_NODE_RESULT_MAX_BYTES(default 10 MiB), so only its size and sha256 were stored. The next step still received the full value; replay the message to run it again.errorstringretryCountintegerdiagnosticsobject | nullWhat the step reported without failing (node_results.diagnostics).
warningsname rows, paths and tables, never values, and are returned to viewers;logs(a JavaScript step's captured console, at most 100 lines of 1 KB) andvars(its channel map) can quote the message and are dropped for viewers (G32).3 fields
warningsarray of stringlogsarray of stringvarsobject
TransformStepConfig
Options of a transform step (checked at save). Other keys are type-specific (fhir-to-hl7v2, fhir-bulk-split).
mapModestringfield-mapping: build a new object, or copy the input and set only the targets ("copy"; hl7: targets edit an HL7 input in place).
One of: "new", "copy"
onRowErrorstringA mapping row that cannot be applied fails the step (rejected: not retried automatically) or drops its field with a warning in the node result's diagnostics.
One of: "fail", "skip"
mappingModestringhl7v2-to-fhir: custom mappings write into the converter's Bundle (merge) or replace the converter (replace).
One of: "merge", "replace"
nextOfKinstringhl7v2-to-fhir: each NK1 as a RelatedPerson linked to the Patient, or left out.
One of: "skip", "related-person"
messageHeaderstringhl7v2-to-fhir: a MessageHeader from MSH whose focus is every other resource, or left out.
One of: "skip", "include"
fieldsarray of stringcode-table: the JSON paths to translate ([*] allowed); an unknown code fails unless onMissingCode says otherwise. Without fields every string is translated and unknown codes pass through.
onMissingCodestringcode-table: an unknown code (with
defaultfor "default").One of: "fail", "passthrough", "default"
codeTablesarray of stringjavascript: code tables lookup(table, code) may read, loaded before the code runs.
escapestringtemplate: how {{values}} are escaped. Default from the text after any leading {{#…}}/{{/…}}/{{else}} tags: json for {…}/[…], hl7 for MSH… (escapes | and line breaks, keeps ^ ~ &), xml for <…, else none.
One of: "none", "json", "hl7", "xml"
onMissingstringtemplate: a path with no value renders empty (JSON: null) with a warning, or fails the step.
One of: "empty", "fail"
delimiterstringcsv-parse / csv-generate: one character; "\t" for a tab.
recordDelimiterstringcsv-parse: "auto" (CRLF, LF or CR) or a literal record separator.
quotestringcsv-parse / csv-generate: the quote character.
headerbooleancsv-parse: the first record names the columns (false: col1..colN or
columns). csv-generate: write a header line.columnsarray of anycsv-parse: [{ name, type: string|number|boolean|date }]. csv-generate: the column order (names).
maxRowsintegercsv-parse: more rows than this fails the step.
quoteModestringcsv-generate: quote only fields that need it, or every field.
One of: "minimal", "all"
xpathsmap of stringxml-parse: names to XPath expressions (a subset: paths, //, *, @attr, text(), count(), [n], [last()], [@a='v'], [child='v']); results in
values.stripNamespacesbooleanxml-parse: drop namespace prefixes from element and attribute names.
stylesheetstringxslt: the XSLT 1.0 stylesheet. Self-contained: xsl:include, xsl:import and document() other than document('') are refused, and so is a DOCTYPE or entity declaration.
sourcestringxslt: what the stylesheet reads: the message text, the text at sourceField, the channel map's sourceVariable, or (hl7-xml) the HL7 v2 message as Mirth's HL7 v2 XML; then output to the message that is <HL7Message> XML becomes HL7 v2 again.
One of: "message", "field", "variable", "hl7-xml"
sourceFieldstringxslt: a dot path when source is "field".
sourceVariablestringxslt: a channel map name when source is "variable".
resultTostringxslt: where the output goes: it becomes the message (a file pickup keeps its details, with the output as content), resultField on a copy of the message, or the channel map's resultVariable (the message goes on unchanged).
One of: "message", "field", "variable"
resultFieldstringxslt: a dot path when resultTo is "field".
resultVariablestringxslt: a channel map name when resultTo is "variable".
paramsarray of objectxslt: global xsl:param values. A value is text; {{channel.KEY}} reads the channel map and {{sender.KEY}} the run's sender settings.
2 fields
namestringrequiredvaluestringrequired
ValueOp
uppercase, lowercase, trim; substring {start, end?}; pad {length ≤ 255, char, side left|right}; replace {find, with} (literal, every occurrence; no regex); date-format {from (auto|ISO|ISO-DATE|HL7|HL7DT|YYYYMMDD|YYYY-MM-DD|MM/DD/YYYY), to, timezone? (IANA)}; type-cast {to number|boolean|string, trueValues?, falseValues?}.
opstringrequiredOne of: "uppercase", "lowercase", "trim", "substring", "pad", "replace", "date-format", "type-cast"
Workflow
idstringrequirednamestringrequireddescriptionstringenabledbooleanrequiredstartNodeIdstringrequiredtriggerobject | object | object | object | object | object | object | object | object | object | object | object | objectrequiredOne of eight supported trigger types. The
typediscriminant selects the applicable additional fields.13 fields
type: "manual"object1 field
typestringrequiredOne of: "manual"
type: "topic"objectRuns once for every event a Publish step writes to the topic (same workspace). Durable fan-out through the work table, at least once, deduplicated by event id.
2 fields
typestringrequiredOne of: "topic"
topicstringrequired
type: "webhook"object13 fields
typestringrequiredOne of: "webhook"
webhookIdstringrequiredpathstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8 (or the Content-Type charset parameter). msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
secretstringtimestampToleranceSecondsintegerReplay window: the most seconds a signed timestamp (webhook-timestamp or x-webhook-timestamp) may be from the engine's clock. Outside it the answer is 401 TIMESTAMP_OUT_OF_TOLERANCE.
requireTimestampbooleanRefuse a valid signature that carries no signed timestamp (401 TIMESTAMP_REQUIRED). Off: senders that sign the body only keep working.
expectedHeadersmap of stringbodySchemaobjectJSON Schema the body must match: type, properties, required, additionalProperties (boolean), items, enum, const, minLength, maxLength, pattern, format (date, date-time, email, uuid), minimum, maximum, minItems, maxItems; $schema, title and description are allowed and not checked; $defs at the root and $ref to
#/$defs/<name>. Other keywords are refused on save. A pasted OpenAPI requestBody (with its components) or document ({ document, operationId }) is stored converted to this subset. A body that no trigger on the webhook id accepts is 400 BODY_SCHEMA_INVALID withproblems(JSON Pointers, never values), and nothing runs.senderFromobjectWhere a JSON delivery names its sender, for the workflow's sender table ({{sender.KEY}}, per-sender connections): exactly one of
path(a dotted path into the body, e.g. organization.id) orheader(a header name). The value is matched like an HL7 message's MSH-4.2 fields
pathstringheaderstring
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "schedule"object3 fields
typestringrequiredOne of: "schedule"
cronstringrequiredCron expression; an alias of the cron trigger, run once per slot across replicas.
timezonestring
type: "cron"object3 fields
typestringrequiredOne of: "cron"
cronExpressionstringrequiredtimezonestring
type: "polling"object12 fields
typestringrequiredOne of: "polling"
intervalintegerrequiredPoll interval in milliseconds (at least 10000).
adapterProfileIdstringrequiredAdapter profile to read; must be in the workflow's workspace.
actionstringAdapter action to call. Default: search when the adapter has it (FHIR adapters, whose read is read-by-id), otherwise read.
paramsobjectAdapter params. A string value containing {{cursor}} gets the stored cursor; before the first cursor such a value is left out.
itemsPathstringDot path to the item array in the adapter result. Not needed for an array or a FHIR Bundle.
idFieldstringDot path to each item's id. With cursorField, the dedup key is the id plus its cursor value, so a later change to the same record runs again.
cursorFieldstringDot path to an ordered change marker (ISO timestamp or number). Without it, the last 5,000 ids seen are the replay guard.
cursorFormatstringHow cursorField values are written when they do not sort as text (MM/DD/YYYY). Each value is read in this format and stored as ISO-8601; {{cursor}} is sent back in it. A value that does not parse does not run. Changing it starts the cursor again.
One of: "MM/DD/YYYY", "MM/DD/YYYY HH:mm", "MM/DD/YYYY HH:mm:ss", "MM/DD/YYYY hh:mm A", "MM/DD/YYYY hh:mm:ss A", "DD/MM/YYYY", "DD/MM/YYYY HH:mm:ss", "YYYYMMDDHHmmss", "epoch-seconds", "epoch-millis"
maxItemsPerPollintegerItems one poll runs. Items sharing the last item's cursor value also run, so a group is never split.
filterobjectInbound filter ({ logic, rules, groups?, customScript? }), as on the other triggers. A polled item it rejects runs no workflow and creates no work row, but the cursor moves past it, so it is not read again.
startFromstringnow: the first poll records what already exists and runs nothing. beginning: the first poll runs every item.
One of: "now", "beginning"
type: "mllp"object13 fields
typestringrequiredOne of: "mllp"
messageTypesarray of stringrequiredsendingFacilitystringsendingAppstringsplitBatchesbooleanSplit an HL7 v2 batch (FHS/BHS ... BTS/FTS, or several MSH segments in one delivery) into one run per message, in batch order, each deduplicated on its own MSH-10.
charsetstringHow the received bytes are decoded before parsing. Omitted: UTF-8. msh-18: the message's MSH-18 (8859/1, UNICODE UTF-8, ASCII), UTF-8 when it is empty or unknown.
One of: "utf-8", "iso-8859-1", "windows-1252", "ascii", "msh-18"
listenerstringThe MLLP listener (port) this trigger takes messages from, declared in Helm
mllp.listeners. Omitted:default(mllp.port). A save naming an undeclared listener is a 400.ackModestringaccept: AA once the message is durably recorded. respond (#751): waits like destination, then answers with the ACK the workflow's Respond step built (a custom MSA and ERR segments, or a whole ACK); with no usable Respond output, the destination-mode outcome; when the wait runs out,
ackTimeoutCode. destination: the ACK waits for the workflow's destinations: AA when every one completed, AR when one rejected it for good, AE on any other failure or when they have not finished withinackTimeoutMs. A resend of a message whose delivery failed replays it once and waits again. Not used for messages from anmsh15listener that set MSH-15.One of: "accept", "destination", "respond"
ackTimeoutMsintegerdestination and respond modes: how long the ACK waits, capped at the listener's
MLLP_TIMEOUTminus 5 s. One sender connection handles one message at a time, so a slow destination slows that sender (intended backpressure).ackTimeoutCodestringrespond mode: the ACK sent when the run has not settled within
ackTimeoutMs. AE: the sender resends (dedup absorbs it). AR: the sender gives up on the message; the recorded run still runs.One of: "AE", "AR"
ackOnFailurestringrespond mode, when a step after the Respond step fails: respond keeps the Respond step's ACK (Mirth's respond from destination); AE answers AE "Workflow failed; retry".
One of: "respond", "AE"
filteredAckstringThe ACK for a message this trigger's
filterdrops when no other workflow takes it. AR: "No matching triggers". AA: accepted, as Mirth answers for filtered messages. Either way the message is kept in Messages as Filtered, with the rule that dropped it.One of: "AR", "AA"
onErrorstringMessages always run in arrival order per sending facility (lane
<trigger>|<MSH-4>). continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.One of: "continue", "hold"
type: "fhir-subscription"object6 fields
typestringrequiredOne of: "fhir-subscription"
resourceTypestringrequiredcriteriastringinteractionstringOne of: "create", "update", "delete", "create-or-update"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger; one lane per resourceType/id). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "x12"object19 fields
typestringrequiredOne of: "x12"
transactionSetsarray of stringrequiredsourceTypestringrequiredWhich deliveries this trigger takes. The server decides a delivery's source:
webhookforPOST /api/triggers/x12with a token,uploadfor a dashboard upload,sftpfor the SFTP pickup. A sender cannot claim one.One of: "sftp", "webhook", "upload"
sftpProfileIdstringsourceType sftp: the SFTP adapter profile whose folder the engine polls for X12 files.
pollIntervalintegersourceType sftp: milliseconds between pickups.
remotePathstringsourceType sftp: the folder to pick files up from.
filenamePatternstringsourceType sftp: a glob (
*,?,[abc]) on the file name.afterProcessingstringsourceType sftp: what happens to a file once its transaction sets are recorded. A file is never run twice,
leaveincluded: the engine's record of a file does not expire while the file is in the folder, anddeduplicate: falsedoes not turn it off.One of: "move", "delete", "leave"
processedPathstringsourceType sftp: where
moveputs files (required for move).errorPathstringsourceType sftp: where a file that is not X12 goes; without it the file stays and the error is recorded.
filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, or by name.
One of: "modified", "name"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1).
One of: "utf8", "latin1"
ackPathstringsourceType sftp: where the 999 / TA1 (see acknowledgments) are written, as
<file>.999/<file>.ta1.acknowledgmentsstring999: a 999 per functional group comes back with the delivery. 999+ta1: also a TA1 when ISA14=1 or the envelope is broken. Syntax checks only (control numbers and counts, a known ST), not implementation-guide validation.
One of: "none", "999", "999+ta1"
orderingstringfifo: deliveries run one at a time in arrival order, across every engine replica (an ordering lane per trigger). none: they run in parallel.
One of: "none", "fifo"
onErrorstringWith ordering fifo. continue: a failed message is reported and the next one runs. hold: a failed message stops its lane; only its own retries and replays run until one succeeds, or the message is discarded from the ACK queue.
One of: "continue", "hold"
type: "sftp"objectPicks files up from an SFTP folder (like a Mirth File Reader). A file is downloaded only once it is minFileAgeMs old and its listed size is at most maxFileBytes; it is moved, deleted or left only after its runs are recorded, and never runs twice.
20 fields
typestringrequiredOne of: "sftp"
sftpProfileIdstringrequiredThe SFTP adapter profile whose folder the engine polls.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "file"objectPicks files up from the folder of a file, ftp, smb, webdav, s3 or sftp adapter profile (a Mirth File Reader over any scheme, P138). Same settings and runs as the sftp trigger; triggerType is "file".
20 fields
typestringrequiredOne of: "file"
adapterProfileIdstringrequiredThe adapter profile whose folder the engine polls: its adapter type (file, ftp, smb, webdav, s3 or sftp) is the transport.
minFileBytesintegerA smaller file is left in place (Mirth fileSizeMinimum).
maxFilesPerPollintegerAt most this many files per pickup; the rest wait for the next one.
recursivebooleanAlso pick up files in subfolders (at most 10 deep), never in processedPath or errorPath. file.name is relative to remotePath; a moved file lands in processedPath by its own name.
ignoreDotbooleanSkip files and folders whose name starts with a dot.
remotePathstringrequiredThe folder to pick files up from.
pollIntervalintegerrequiredMilliseconds between pickups.
filenamePatternstringA glob (
*,?,[abc]) on the file name.filenameRegexbooleanfilenamePattern is a regular expression matched against the whole name.
minFileAgeMsintegerA file modified more recently than this may still be being written and waits for a later pickup.
maxFileBytesintegerA larger file (by its listed size) is never downloaded: it goes to errorPath (or stays) with a size error.
sortBystringPickup order: oldest first, by name, or smallest first.
One of: "modified", "name", "size"
encodingstringHow file bytes are decoded (latin1: ISO-8859-1). binary: the run's content is the bytes as base64, with contentEncoding "base64" (not with batch.mode rows).
One of: "utf8", "latin1", "windows-1252", "ascii", "utf16le", "binary"
afterProcessingstringWhat happens to a file once its runs are recorded.
leave: the file stays and never runs again while it is unchanged.One of: "move", "delete", "leave"
processedPathstringWhere
moveputs files (required for move; not remotePath).errorPathstringWhere a file that is too large, or a CSV that does not parse (rows mode), goes; without it the file stays and the error is recorded.
batchobject3 fields
modestringfile: one run per file, with { file, content }. rows: one run per CSV row, with { file, row, rowIndex, rowCount }; all rows of a file are recorded together.
One of: "file", "rows"
csvobjectrows mode: csv-parse options (delimiter, recordDelimiter, quote, escape, header, columns, skipLines, trim, skipEmpty, strictColumns, maxRows at most WORKFLOW_MAX_PENDING).
fixedWidthobjectrows mode, instead of csv: fixed-width-parse options (columns or records, recordDelimiter, recordLength, headerLines, footerLines, unknownRecords, maxRows at most WORKFLOW_MAX_PENDING); one run per record.
orderingstringfifo: runs execute one at a time in pickup order (files, then rows), across every engine replica.
One of: "none", "fifo"
onErrorstringWith ordering fifo: what a failed run does to its lane.
One of: "continue", "hold"
type: "jms"objectConsumes a JMS queue or topic over AMQP 1.0 (a Mirth JMS Listener) through a jms adapter profile. One engine replica consumes each trigger. A message is acknowledged to the broker only once its run is recorded, so a crash redelivers it, and the JMS message id dedups the redelivery. A message the filter drops is acknowledged; one that can't be recorded (license, backlog, shutdown) stays on the broker.
10 fields
typestringrequiredOne of: "jms"
adapterProfileIdstringrequiredThe jms adapter profile (broker host, login, TLS).
destinationstringrequiredQueue or topic name.
destinationTypestringOne of: "queue", "topic"
subscriptionNamestringTopics: a durable subscription under this name (the profile's clientId, else medhook-<workflowId>, is its client id), so messages sent while no engine is connected wait for it.
selectorstringA JMS message selector, applied by the broker.
prefetchintegerMessages the broker may send ahead of acknowledgement.
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
type: "soap"objectA SOAP 1.1/1.2 endpoint at /api/triggers/soap/{listenerId} with its WSDL at ?wsdl (a Mirth Web Service Listener).
15 fields
typestringrequiredOne of: "soap"
listenerIdstringrequiredserviceNamestringThe generated WSDL's service name.
namespacestringThe generated WSDL's target namespace.
soapVersionstringOne of: "1.1", "1.2", "both"
operationsarray of stringOperation (Body element) names it takes; empty takes any.
wsSecuritystringOne of: "none", "UsernameToken"
wsUsernamestringwsPasswordstringWrite-only: stored encrypted, read back as
__set__.secretstringHMAC-SHA256 key for x-webhook-signature. Write-only, read back as
__set__.wsdlstringA WSDL to serve instead of the generated one.
responseobject3 fields
modestringOne of: "accepted", "destination"
nodeIdstringtimeoutMsinteger
orderingstringOne of: "none", "fifo"
onErrorstringOne of: "continue", "hold"
deduplicateboolean
metadataobjectArbitrary workflow-level metadata.
1 field
handlesPHIbooleanWhen true the engine requires a BAA-enabled license before executing.
createdBystringcreatedAtstring (date-time)updatedAtstring (date-time)ownerstring | nullWho owns the workflow (Settings · General). Changed with PATCH; null = not set.
tagsarray of stringLowercased tags (Settings · General). Changed with PATCH.
maxInFlightinteger | nullMost runs of this workflow the work runner starts at once across replicas: queued messages and polls wait while that many run (Settings · Delivery). A manual run is not held back but counts. Changed with PATCH; null = no limit.
dedupTtlHoursintegerGET only: how long a duplicate receipt is kept (INBOUND_DEDUP_TTL_HOURS, default 24), the Duplicate messages window.
maxWorkflowRetriesinteger | nullMax times to retry the entire workflow after top-level failure. Each retry is a durable pending execution due after the backoff: it survives a restart and holds no queue slot or ordering lane while it waits. Saved with the workflow and its versions; the deployed version's value runs. null = not set (0).
workflowRetryDelayMsinteger | nullBase delay (ms) before the first workflow-level retry; doubles per attempt, capped at 30 minutes.
WorkflowEdge
idstringrequiredsourcestringrequiredtargetstringrequiredlabelstringHow the edge routes. "error": the failure path of its source step. "true"/"false": a condition (Filter) step's branches. "done": a loop's after-loop edge, run once after the last item with the loop output (without one, the path ends at the loop). Any other label is display text. Edges carry no condition: a request with a non-empty
conditionis refused (400); branch with a condition (Filter) step instead.
WorkflowNode
idstringrequiredtypestringrequiredrespond: answers a webhook caller (the trigger must be a webhook; one per workflow; in a channel it is a destination's send). data.statusCode (2xx, 4xx or 5xx, default 200; not 401, 403, 409, 413, 429 or 503, which the webhook route answers itself), data.contentType, data.headers (name: Latin-1 value, at most 20; not Content-Type, Content-Length, Set-Cookie, Location, Refresh, Clear-Site-Data, Strict-Transport-Security, Access-Control-*, Content-Security-Policy* or Cross-Origin-*), data.timeoutMs (1000-60000, how long the caller waits) and data.errorStatus (4xx or 5xx, not the reserved ones, default 502, what a failed run answers); the step's input is the body. Without its own custom or destination response setting, the webhook waits for the run and answers this. component: data.componentId and data.release ("1.0.0") pin a release of a component in the same workspace; its steps run inline in this run (each one a step of the trace, ids "<step>~<inner>"), between a check of its inputs and of its outputs, and only its declared outputs go on. publish: data.topic names a topic in the same workspace; the message is checked against its schema and delivered once to every workflow with a topic trigger on it, as queued runs (not waited for). In a router branch it is the destination's send. router: each non-error outgoing edge is one isolated destination (filter → map → send). data.order "concurrent" (default) starts them all at once; "sequential" runs them one after another in edge order, a failed destination never stopping the next, and each later destination's JavaScript outputs and filters read the earlier ones as the frozen
responsesglobal: responses[name] = { status: sent | discarded (a Sink, live or test) | queued | filtered | failed | not-run, dryRun (true in a dry run or step test: status reads "sent" as in a live run, but nothing was sent; the trace shows WOULD SEND), data (the send step's output), error }. loop: runs its body per item; its "done" edge continues after the last item. trigger: the start node passes the message through; mid-graph, data.workflowId names a workflow in the same workspace that is started as a queued run with the message (data.input merged into a record message) and not waited for; chains stop at 5 levels. A "wait" step is refused (removed).One of: "adapter", "transform", "condition", "parallel", "router", "loop", "trigger", "publish", "component", "respond", "collector"
labelstringrequiredpositionobjectrequired2 fields
xnumberrequiredynumberrequired
dataobjectrequiredNode-type-specific configuration. Shape varies by
type(AdapterStepData, TransformStepData, ConditionStepData, etc.). Any step may carryerrorHandling(ErrorHandling). A transform step'smappingrows are FieldMapping and itsconfigoptions TransformStepConfig, both checked at save.3 fields
errorHandlingErrorHandlingWhat a failed step does. Step retries wait in-process within one run, so each wait is capped at 60 s and the attempts at 10; longer waits are workflow retries (maxWorkflowRetries), which are durable.
mappingarray of FieldMappingconfigTransformStepConfigOptions of a transform step (checked at save). Other keys are type-specific (fhir-to-hl7v2, fhir-bulk-split).
WorkflowTemplate
idstringrequirednamestringrequireddescriptionstringcategorystringOne of: "fhir", "hl7", "general", "etl"
tagsarray of stringiconstringshapestringThe pattern the template follows.
One of: "receive-forward", "request-respond", "poll-push", "sync", "batch"
groupstringCard kicker / category chip.
needsarray of objectWhat it needs set up first: a tunnel, a profile per adapter type.
3 fields
kindstringrequiredOne of: "tunnel", "adapter"
adapterTypestringlabelstringrequired
nodesarray of WorkflowNodeedgesarray of WorkflowEdge
WorkflowTestCase
idstringnamestringcreatedAtstring (date-time)updatedAtstring (date-time)createdBystringbytesintegerSize of the input message.
messageTypestring | nullMSH-9 type^event (HL7 v2) or resourceType (FHIR); null otherwise. Never content.
hasExpectedOutputbooleanstepOutputCountintegerA step case's saved step outputs (compared on each run); 0 for a whole-workflow case.
assertionCountintegerstepIdsarray of stringThe steps the case tests (Run with sample); [] = the whole workflow.
startAtstringHow the input reaches the steps: message or step-input.
fromRealMessagebooleanThe input is a real message (pinned from an execution or a recent message): its read is masked unless revealed.
WorkflowTestCasesRun
totalintegerpassedintegerfailedintegerresultsarray of object8 fields
idstringnamestringpassedbooleandiffCountintegerdiffFieldsarray of stringNames of the fields that differ, never values.
failedAssertionsarray of object4 fields
fieldstringopstringexpectedstringactualstring
brokenStepIdsarray of stringA step case: the node ids of the steps whose output no longer matches, or that failed.
errorstringWhy the dry run gave no output. A step case: its steps are gone (steps-missing) or the sample stopped before them (not-reached).
One of: "filtered", "failed", "timeout", "steps-missing", "not-reached"