Executions
Executions endpoints of the MedHook engine API: 12 operations with parameters, schemas and a curl example for each.
On this page
Inspect, stream, replay, and cancel workflow executions.
List executions
get/api/executions
Returns cursor-paginated execution history ordered by (startedAt desc, id desc). Only executions in the caller's workspace are returned (executions are stamped with their workflow's workspace). In-flight executions cached only in Redis (not yet persisted to Postgres) are merged into page 1 when their cached workspace matches; entries cached without one count as default. Filters (status, triggerType, from/to, q, workflowId) apply to Postgres and to the merged Redis entries with the same predicate, and to every page of the cursor. A bad filter value is a 400. Viewers get each row with triggerData: { redacted: true } and redacted: true (G32: no message content). Rate limited: 60 req / 60 s.
Auth: Bearer token (how to get one) · Operation: listExecutions
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 |
workflowId | query | string | Only this workflow's executions. |
status | query | string | Comma list of statuses: pending, running, completed, failed, partial, cancelled. |
triggerType | query | string | Comma list of trigger types: mllp, webhook, x12, fhir-subscription, polling, cron, schedule, manual, replay. |
from | query | string (date-time) | Started at or after (ISO-8601 date-time with an offset or Z). |
to | query | string (date-time) | Started at or before. Not before |
q | query | string | Execution id prefix, or text in the workflow name or error (case-insensitive). Never searches trigger data (message bodies are PHI; search them in Messages). Without |
Responses
- 200Paginated list of executions.
Response fields
application/json · object
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.
- 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/executions" \
-H "Authorization: Bearer $TOKEN"Get execution
get/api/executions/{id}
The execution with its per-node results. Workspace-scoped (404 elsewhere) and audited as execution.viewed; a signed-in person's raw read (no view=masked, no reveal) also writes message.viewed with the patient's keyed hash and raw: true, while an API client's read is audited as before. Viewers never see message content (G32): triggerData is { redacted: true }, every node result's data is null, redacted is true, and the audit row carries redacted: true; status, timings and errors stay. The builder's recorded run reads it with view=masked: trigger data, node input/output and errors masked (phiMasked: true), console lines withheld. phi=reveal&reason= serves it as stored after writing phi.revealed (the reason, the patient's keyed hash, part: "run"); a viewer's reveal is 403 PHI_REVEAL_FORBIDDEN, an unknown reason 400, and a reveal that can't be recorded serves nothing (500 PHI_REVEAL_NOT_RECORDED). Without either the answer is unchanged.
Auth: Bearer token (how to get one) · Operation: getExecution
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Execution ID. |
view | query | string |
|
phi | query | string |
|
reason | query | string | Why PHI is shown, with |
grant | query | string | With |
Responses
- 200Execution detail with per-node results.
Response fields
application/json · object
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404The requested resource was not found.
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/executions/exec_xyz789" \
-H "Authorization: Bearer $TOKEN"Replay execution
post/api/executions/{id}/replay
Re-run a workflow with the same trigger payload as the original execution. The run uses the deployed version of the workflow, which must be enabled. A fresh execution is created as pending and runs asynchronously; the 202 response names it (newExecutionId). In an ordered lane (MLLP, or a trigger with ordering: fifo) the replay keeps the original message's place: it runs before newer messages still waiting in the lane. In a lane held after a failure (onError: hold), a replay of the held message runs and releases the lane when it succeeds; a replay of any other message waits behind the hold. Needs a valid license. Rate limited to 10 requests per minute.
Which destinations re-run. A workflow with a router sends to several destinations. With no scope in the body, a partial execution re-runs only the destinations that failed, a replay that was itself targeted re-runs the same set, and anything else re-runs every destination. A destination that another attempt of the same message already delivered is never sent again. destinationIds names the destinations yourself. allDestinations: true resends to all of them.
Refusals. The code tells you why: NOT_FOUND (404), WORKFLOW_DISABLED (403), IN_PROGRESS and RETRY_SCHEDULED (409: an attempt is still running, or a retry is waiting), ALREADY_DELIVERED (409: every destination already received it), NO_FAILED_DESTINATION (409), CHAIN_TOO_DEEP (409), CONFLICTING_SCOPE (400: both scopes given), INVALID_REQUEST (400), UNKNOWN_DESTINATION (400), NO_DESTINATIONS (400), NOT_A_MESSAGE (400: a stored message is needed to target destinations) STALE_SCOPE (400: the recorded scope names a destination that no longer exists) and MASKED_INPUT (400: modifyInput holds masked PHI (•••) that the stored message did not, so it was edited from a masked screen; reveal PHI and edit the message as received).
Stored trigger headers keep their names, and credential values are masked.
Auth: Bearer token (how to get one) · Operation: replayExecution
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Execution ID. |
Request body
application/json · object
modifyInputobjectFields merged over the original trigger input for this replay. Refused with 400
MASKED_INPUTwhen it holds more masked values (•••) than the stored message.destinationIdsarray of stringRe-run only these channel destinations (router edge ids). Unknown ids are refused with 400.
allDestinationsbooleanResend to every destination, not only the failed ones. Not combinable with
destinationIds.
Responses
- 202Replay started.
Response fields
application/json · object
newExecutionIdstringrequiredworkflowIdstringrequiredoriginalExecutionIdstringrequireddestinationIdsarray of string | nullThe destinations that re-run.
nullmeans every destination.
- 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/executions/exec_xyz789/replay" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"modifyInput": {},
"destinationIds": [
"string"
],
"allDestinations": true
}'Cancel execution
post/api/executions/{id}/cancel
Cancels a pending or running execution. pending → 200 cancelled: the row is cancelled at once and never runs. running (or failed with an automatic workflow retry scheduled) → 202 cancelling: the cancel is stored on the execution and reaches the replica running it within one heartbeat interval; the run stops before its next step (a retry backoff ends at once, no further attempt is made) and ends cancelled. A send already in flight completes and its outcome is recorded. The id of an earlier workflow-retry attempt acts on the run's newest attempt: the cancel is stored there, and a run whose newest attempt has finished (a retry completed, or the retries ran out) is a 400. Any other status, or a run that finished meanwhile, is a 400 (Cannot cancel execution with status: ...). Rate limited to 10 requests per minute.
Auth: Bearer token (how to get one) · Operation: cancelExecution
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Execution ID. |
Responses
- 200A pending execution was cancelled.
Response fields
application/json · object
successbooleanrequiredexecutionIdstringrequiredstatusstringrequiredOne of: "cancelled"
cancelledAtstring (date-time)
- 202Cancel requested for a running execution; it ends `cancelled` before its next step.
Response fields
application/json · object
successbooleanrequiredexecutionIdstringrequiredstatusstringrequiredOne of: "cancelling"
requestedAtstring (date-time)
- 400Request body or query parameters failed validation.
application/json · ApiError
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404The requested resource was not found.
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/executions/exec_xyz789/cancel" \
-H "Authorization: Bearer $TOKEN"Get execution logs
get/api/executions/{id}/logs
One log line per node result, in start order. Node payloads are never returned. Workspace-scoped (404 elsewhere) and audited as execution.viewed (with redacted: true for a viewer).
Auth: Bearer token (how to get one) · Operation: getExecutionLogs
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Execution ID. |
Responses
- 200Structured log entries for the execution.
Response fields
application/json · object
executionIdstringrequiredstatusstring | nullrequiredtotalNodesintegerrequiredsuccessfulNodesintegerrequiredfailedNodesintegerrequiredlogsarray of objectrequired10 fields
timestampstring (date-time)requiredlevelstringrequiredOne of: "info", "warn", "error"
messagestringrequirednodeIdstringrequirednodeNamestringstatusstringrequiredstartedAtstring (date-time)requiredcompletedAtstring (date-time) | nulldurationinteger | nullMilliseconds
errorstring | null
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404The requested resource was not found.
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/executions/exec_xyz789/logs" \
-H "Authorization: Bearer $TOKEN"Stream execution events (SSE)
get/api/executions/{id}/stream
Opens a Server-Sent Events stream that emits per-node status updates every 500 ms until the execution reaches a terminal state. Viewers get each update without trigger data or node output (G32), like GET /api/executions/{id}. Because browser EventSource cannot set custom headers, the JWT must be passed as the token query parameter rather than the Authorization header.
Auth: None, public route · Operation: streamExecution
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Execution ID. |
tokenrequired | query | string | JWT Bearer token (used in place of Authorization header for SSE). |
Responses
Example request
curl "$ENGINE_URL/api/executions/exec_xyz789/stream?token=string"List batch reads
get/api/batch-runs
This workspace's batch reads, newest first (at most 50), with their progress. No row content.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: listBatchRuns
Responses
- 200The batches.
Response fields
application/json · object
batchesarray of object19 fields
idstringworkflowIdstringworkflowNamestringadapterProfileIdstringstatusstringrunning: reading chunks as the backlog allows (with lastError set, retrying a transient read failure after a back-off). paused: no chunk is read (queued rows still run). completed: every row is queued. cancelled: reading stopped. failed: a read failed in a way a retry will not fix (lastError says why); resume it once fixed.
One of: "running", "paused", "completed", "cancelled", "failed"
chunkSizeintegerRows read per chunk.
maxBacklogintegerThe workflow's pending backlog never passes this; the next chunk is read at or below maxBacklog - chunkSize.
rowsReadintegerRows read and queued so far.
totalRowsinteger | nullThe result's row count, when the source reports it.
queuedintegerRow runs waiting to run.
runningintegerdoneintegerRow runs that completed.
failedintegerRow run attempts that failed.
cancelledintegerlastErrorstring | nullThe last read failure: an error code and a summary with anything the source sent withheld.
readAttemptsintegerTransient read failures of the current chunk in a row (0 once a chunk is read). The wait doubles after each, from 30 s up to 15 min; the 8th fails the batch.
createdAtstring (date-time)updatedAtstring (date-time)completedAtstring (date-time) | null
- 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/batch-runs" \
-H "Authorization: Bearer $TOKEN"Start a batch read
post/api/batch-runs
Reads a large BigQuery query (one job, page by page) or SQL SELECT (keyset: the statement binds :after and :limit and orders by keyColumn, starting after keyInitial) or a CSV file over SFTP (streamed from the byte offset of the next unread record; a file whose size or modified time changes mid-batch fails it) or a paginated Generic REST GET (every pagination mode, read to the last page; the checkpoint is the next page's position, never a credential or a query value) in chunks, and queues each row as one run of the workflow, input {triggerType: "batch", batchId, rowIndex, row}. The next chunk is read only once the workflow's pending backlog is at or below maxBacklog - chunkSize; each chunk's row runs and the read's checkpoint are stored together, so a restart resumes where it stopped and every row runs once. A transient read failure (a rate limit, a 5xx, a dropped connection) is retried from the checkpoint with a doubling back-off (30 s, 1 min, 2 min, ... at most 15 min); after 8 failed attempts in a row, or on any other failure, the batch is failed and can be resumed from its checkpoint. 409 while the workflow has another running or paused batch. The workflow must be on; the license and PHI checks are a manual run's (403 PHI_NOT_AUTHORIZED from the license, 403 PHI_IN_SANDBOX in a sandbox workspace that blocks real PHI). Audited as batch.started. Rate limited: 10 req / 60 s.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: startBatchRun
Request body (required)
application/json · object
workflowIdstringrequiredadapterProfileIdstringrequiredA BigQuery, SQL database, SFTP or Generic REST profile.
paramsobjectrequiredBigQuery: the query step's params (
sql,params,paramTypes). SQL database:sql,keyColumn,keyInitial, optionalparams. SFTP:remotePath, optionalcsv(csv-parse options:delimiter,quote,escape,header,columns,skipLines,trim,skipEmpty,strictColumns,recordDelimiter) andencoding(utf8orlatin1). Generic REST:endpointorurlTemplate, optionalqueryandheaders, andpagination(required; the read step's settings,maxPagesandmaxItemsignored); 400 without it.chunkSizeintegerDefault 1000, at most 10000.
maxBacklogintegerDefault five chunks, at most half of WORKFLOW_MAX_PENDING; at least chunkSize, at most WORKFLOW_MAX_PENDING - chunkSize, so intake keeps a chunk's room.
Responses
- 201Started.
Response fields
application/json · object
batchobject19 fields
idstringworkflowIdstringworkflowNamestringadapterProfileIdstringstatusstringrunning: reading chunks as the backlog allows (with lastError set, retrying a transient read failure after a back-off). paused: no chunk is read (queued rows still run). completed: every row is queued. cancelled: reading stopped. failed: a read failed in a way a retry will not fix (lastError says why); resume it once fixed.
One of: "running", "paused", "completed", "cancelled", "failed"
chunkSizeintegerRows read per chunk.
maxBacklogintegerThe workflow's pending backlog never passes this; the next chunk is read at or below maxBacklog - chunkSize.
rowsReadintegerRows read and queued so far.
totalRowsinteger | nullThe result's row count, when the source reports it.
queuedintegerRow runs waiting to run.
runningintegerdoneintegerRow runs that completed.
failedintegerRow run attempts that failed.
cancelledintegerlastErrorstring | nullThe last read failure: an error code and a summary with anything the source sent withheld.
readAttemptsintegerTransient read failures of the current chunk in a row (0 once a chunk is read). The wait doubles after each, from 30 s up to 15 min; the 8th fails the batch.
createdAtstring (date-time)updatedAtstring (date-time)completedAtstring (date-time) | 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/batch-runs" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"workflowId": "string",
"adapterProfileId": "string",
"params": {},
"chunkSize": 0,
"maxBacklog": 0
}'Get a batch read
get/api/batch-runs/{id}
One batch read with its progress. No row content.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getBatchRun
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The batch id. |
Responses
- 200The batch.
Response fields
application/json · object
batchobject19 fields
idstringworkflowIdstringworkflowNamestringadapterProfileIdstringstatusstringrunning: reading chunks as the backlog allows (with lastError set, retrying a transient read failure after a back-off). paused: no chunk is read (queued rows still run). completed: every row is queued. cancelled: reading stopped. failed: a read failed in a way a retry will not fix (lastError says why); resume it once fixed.
One of: "running", "paused", "completed", "cancelled", "failed"
chunkSizeintegerRows read per chunk.
maxBacklogintegerThe workflow's pending backlog never passes this; the next chunk is read at or below maxBacklog - chunkSize.
rowsReadintegerRows read and queued so far.
totalRowsinteger | nullThe result's row count, when the source reports it.
queuedintegerRow runs waiting to run.
runningintegerdoneintegerRow runs that completed.
failedintegerRow run attempts that failed.
cancelledintegerlastErrorstring | nullThe last read failure: an error code and a summary with anything the source sent withheld.
readAttemptsintegerTransient read failures of the current chunk in a row (0 once a chunk is read). The wait doubles after each, from 30 s up to 15 min; the 8th fails the batch.
createdAtstring (date-time)updatedAtstring (date-time)completedAtstring (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
- 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/batch-runs/<id>" \
-H "Authorization: Bearer $TOKEN"Pause, resume or cancel a batch read
post/api/batch-runs/{id}/{action}
pause: no more chunks are read (rows already queued still run). resume: a paused or failed batch reads on from the stored checkpoint (rows already queued are not queued again); the optional body {chunkSize} may lower the chunk size (400 when larger than the batch's); 409 while another batch of the workflow is running or paused. cancel: reading stops and the queued rows are cancelled. pause and cancel take no body. Audited as batch.paused, batch.resumed or batch.cancelled. Rate limited: 30 req / 60 s.
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: changeBatchRun
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The batch id. |
actionrequired | path | string |
|
Request body
application/json · object
chunkSizeintegerresume only: a smaller chunk size, at least 1.
Responses
- 200Done. `changed` is false when the batch was not in a state the action applies to.
Response fields
application/json · object
changedbooleanbatchobject19 fields
idstringworkflowIdstringworkflowNamestringadapterProfileIdstringstatusstringrunning: reading chunks as the backlog allows (with lastError set, retrying a transient read failure after a back-off). paused: no chunk is read (queued rows still run). completed: every row is queued. cancelled: reading stopped. failed: a read failed in a way a retry will not fix (lastError says why); resume it once fixed.
One of: "running", "paused", "completed", "cancelled", "failed"
chunkSizeintegerRows read per chunk.
maxBacklogintegerThe workflow's pending backlog never passes this; the next chunk is read at or below maxBacklog - chunkSize.
rowsReadintegerRows read and queued so far.
totalRowsinteger | nullThe result's row count, when the source reports it.
queuedintegerRow runs waiting to run.
runningintegerdoneintegerRow runs that completed.
failedintegerRow run attempts that failed.
cancelledintegerlastErrorstring | nullThe last read failure: an error code and a summary with anything the source sent withheld.
readAttemptsintegerTransient read failures of the current chunk in a row (0 once a chunk is read). The wait doubles after each, from 30 s up to 15 min; the 8th fails the batch.
createdAtstring (date-time)updatedAtstring (date-time)completedAtstring (date-time) | null
- 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
- 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/batch-runs/<id>/<action>" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"chunkSize": 0
}'List the execution archive
get/api/execution-archive
Manifests of the archives execution retention wrote before deleting expired executions (EXECUTION_ARCHIVE_DIR), newest first: id, size, SHA-256, counts, dates, workspaces and the key id. Never message content. configured: false when no archive is set up. With executionId, only the archives that hold it.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: listExecutionArchives
Parameters
| Name | In | Type | Description |
|---|---|---|---|
executionId | query | string | An execution id: only the archive(s) holding it. |
Responses
- 200The archives.
application/json · object
- 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/execution-archive" \
-H "Authorization: Bearer $TOKEN"Read one archived execution
get/api/execution-archive/{id}
Checks the archive object against its manifest (size and SHA-256), then returns one execution and its step results with message content decrypted by the engine's message keys. Returns PHI: every read is audited as execution.archive_read. 409 when the object no longer matches its manifest.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: readArchivedExecution
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Archive id (executions-<time>-<hex>). |
executionIdrequired | query | string | An execution id: only the archive(s) holding it. |
Responses
- 200The execution, its step results and the manifest.
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 "$ENGINE_URL/api/execution-archive/<id>?executionId=string" \
-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.
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).
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