System
System endpoints of the MedHook engine API: 29 operations with parameters, schemas and a curl example for each.
On this page
- Health check
- Liveness probe
- Readiness probe
- Build version and feature surface
- Prometheus metrics
- Run several API calls in one request
- GraphQL over GET
- GraphQL query
- This API description
- Run the self-checks
- Download the support bundle
- My dashboard layout
- Save my dashboard layout
- Reset my dashboard layout
- Set the workspace default dashboard layout
- Clear the workspace default dashboard layout
- Agent summary
- The read-only dashboard link
- Make a read-only dashboard link
- Revoke the read-only dashboard link
- A shared dashboard (public)
- Engine services
- What needs attention
- Dashboard summary
- List event log entries
- Export the event log as OCEL 2.0
- Set up the Demo Health sandbox
- Recent changes
- Status map
- Schemas
Health and Prometheus metrics endpoints.
Health check
get/api/health
Returns the overall engine health and per-service status (Redis, Postgres, Medplum, MLLP, cached license, memory, and for the dashboard's Engine services card the FHIR store, object storage, work queue, engines and the Agent, as kinds, states and counts only: engines.ready (replicas with a heartbeat under 60 s old) and engines.desired (MEDHOOK_DESIRED_REPLICAS, else ready), agent.status off/unconfigured/on with agent.budgetUsedPct of today's AI budget; never a resource name, path or database version, which the signed-in GET /api/dashboard/services adds). platform is gcp when GCP_PROJECT_ID is set. Checks run in parallel with a 2 s timeout each. No authentication required: without one, only the overall status and each check's status word are returned; a session or bearer token adds the detail. For Kubernetes probes use /api/live (liveness) and /api/ready (readiness).
Auth: None, public route · Operation: getHealth
Responses
- 200Healthy or degraded (Medplum, MLLP or license).
application/json · HealthCheck
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
- 503Unhealthy: Postgres or Redis is unreachable.
application/json · HealthCheck
Example request
curl "$ENGINE_URL/api/health"Liveness probe
get/api/live
Kubernetes liveness and startup probe. Returns 200 whenever the process can answer; touches no dependency. No authentication required.
Auth: None, public route · Operation: getLive
Responses
- 200The process is alive.
Response fields
application/json · object
alivebooleanrequired
Example request
curl "$ENGINE_URL/api/live"Readiness probe
get/api/ready
Kubernetes-style readiness check. Returns 200 only when every critical downstream dependency (Postgres, Redis, cached license) is reachable and valid. Returns 503 otherwise so the orchestrator can remove the pod from the load-balancer rotation without restarting the container. No authentication required.
Auth: None, public route · Operation: getReady
Responses
- 200All dependencies reachable; pod is ready for traffic.
Response fields
application/json · object
readybooleanrequiredchecksobjectrequired3 fields
postgresstringrequiredredisstringrequiredlicensestringrequired
- 503At least one dependency is unreachable, timed out, or invalid.
Response fields
application/json · object
readybooleanrequiredchecksobjectrequired3 fields
postgresstringrequiredredisstringrequiredlicensestringrequired
Example request
curl "$ENGINE_URL/api/ready"Build version and feature surface
get/api/version
Returns the engine version, build commit, build date, Node.js version, supported FHIR versions, registered adapter list, and a feature-flag block (AI availability, PHI enforcement, GraphQL). No authentication required — intended for ops diagnostics and customer support. Without a session or bearer token only name, version, commit and buildDate are returned.
Auth: None, public route · Operation: getVersion
Responses
- 200Version + feature info.
Response fields
application/json · object
versionstringrequirednamestringrequiredcommitstring | nullrequiredGit commit SHA at build time (from GIT_COMMIT_SHA env).
buildDatestring | nullrequiredBuild timestamp (from BUILD_DATE env).
nodestringrequiredprocess.version of the running Node.js runtime.
fhirVersionsarray of stringrequiredadaptersarray of stringrequiredRegistered adapter type identifiers.
featuresobjectrequired5 fields
aiAvailablebooleanrequiredTrue when there is a configured AI provider (ANTHROPIC_API_KEY, or AI_PROVIDER=vertex with AI_VERTEX_PROJECT and AI_VERTEX_REGION).
phiEnforcementbooleanrequiredTrue unless SKIP_LICENSE_VALIDATION=true (dev/test only).
graphqlEnabledbooleanrequiredTrue when GRAPHQL_ENABLED=true; /api/graphql is a 404 otherwise.
flatFieldPathsbooleanrequiredTrue when FLAT_FIELD_PATHS_ENABLED=true (off by default): the flat field-path view for HL7 v2 and JSON samples.
sampleFetchbooleanrequiredFalse when SAMPLE_FETCH_ENABLED=false: the builder's Fetch a sample (POST /api/workflows/{id}/sample/fetch) is turned off.
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/version"Prometheus metrics
get/api/metrics
Returns metrics in the Prometheus text exposition format. Covers workflow execution counters, adapter call counters, and duration histograms. Scrape interval: 15 s recommended.
Auth: None, public route · Operation: getMetrics
Responses
Example request
curl "$ENGINE_URL/api/metrics"Run several API calls in one request
post/api/batch
Runs up to 20 sub-requests in parallel and returns one result for each. Each sub-request is a method and a url (a path on this engine), with an optional body and headers. The engine sends each one as a new request; it does not forward your token, so put an Authorization header in each sub-request. Because the caller chooses the headers and URLs, only an admin may use this route. Rate limited to 10 requests per minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: runBatch
Request body (required)
application/json · object
requestsarray of objectrequired4 fields
methodstringrequiredurlstringrequiredbodyanyheadersmap of string
Responses
- 200One result per sub-request, in order.
Response fields
application/json · object
resultsarray of object4 fields
statusintegerdataanyerrorstringurlstring
countinteger
- 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 POST "$ENGINE_URL/api/batch" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"requests": [
{
"method": "GET",
"url": "/api/workflows",
"body": null,
"headers": {}
}
]
}'GraphQL over GET
get/api/graphql
The same endpoint with the query in the URL, and the GraphiQL explorer when you open it in a browser. 404 unless GRAPHQL_ENABLED=true.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: graphqlQueryGet
Parameters
| Name | In | Type | Description |
|---|---|---|---|
query | query | string | The GraphQL query. |
Responses
Example request
curl "$ENGINE_URL/api/graphql" \
-H "Authorization: Bearer $TOKEN"GraphQL query
post/api/graphql
A read-only GraphQL endpoint (queries only; every write goes through the REST routes). It is off unless GRAPHQL_ENABLED=true: every request is 404 until then. Each resolver checks your bearer token and scopes its data to the caller's workspace. Rate limited to 60 requests per minute. Production responses mask internal error details.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: graphqlQuery
Request body (required)
application/json · object
querystringrequiredvariablesobjectoperationNamestring
Responses
- 200A standard GraphQL response with `data` and `errors`.
application/json · object
- 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
Example request
curl -X POST "$ENGINE_URL/api/graphql" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"query": "{ __typename }",
"variables": {},
"operationName": "string"
}'This API description
get/api/openapi.json
The OpenAPI document for this engine, as JSON. Needs a token (any role); without one the answer is 401. The same document is published without sign-in at https://medhook.dev/docs/openapi.json.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getOpenapiSpec
Responses
- 200The OpenAPI 3.0.3 document.
application/json · object
- 401No credential, or the token is invalid or expired.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/openapi.json" \
-H "Authorization: Bearer $TOKEN"Run the self-checks
get/api/diagnostics
First-run troubleshooting. Runs every self-check (configuration, database, Redis, license, network, system) and returns each result with a remediation hint. It answers 200 even when checks fail, so read status and summary.failed. The result shows which settings are present, so it needs a token. Rate limited to 12 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: runDiagnostics
Responses
- 200The report.
Response fields
application/json · object
statusstringsummaryobjectchecksarray of object5 fields
idstringnamestringcategorystringOne of: "config", "database", "redis", "license", "network", "system"
statusstringOne of: "pass", "fail", "warn", "skip"
severitystringOne of: "critical", "important", "recommended"
- 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/diagnostics" \
-H "Authorization: Bearer $TOKEN"Download the support bundle
post/api/diagnostics/bundle
Builds a zip of diagnostics for support. De-identified samples are off unless you ask for them. The call is audited and rate limited.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: createSupportBundle
Request body
application/json · object
sectionsobject6 fields
checksbooleanconfigbooleantunnelsbooleanexecutionsbooleanackQueuebooleansamplesbooleanOff unless true.
Responses
- 200The zip file.
application/zip · string (binary)
- 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 POST "$ENGINE_URL/api/diagnostics/bundle" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"sections": {
"checks": true,
"config": true,
"tunnels": true,
"executions": true,
"ackQueue": true,
"samples": true
}
}'My dashboard layout
get/api/me/dashboard-layout
The caller's Dashboard layout in their workspace: their own, else the workspace default, else the built-in default. Card order, spans and hidden cards only. Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getMyDashboardLayout
Responses
- 200The layout the caller now sees.
Response fields
application/json · object
layoutobject3 fields
orderarray of stringThe cards in grid order. A card left out is put at its default place.
hiddenarray of stringCards taken off the grid.
spanmap of stringWidth overrides by card: full (both columns) or half. A card not listed keeps its default (the Agent summary, Status map, Needs you, Totals and Delivery SLA by workflow are full).
sourcestringWhere it comes from: the caller's own (user), the workspace default (workspace) or the built-in default (default).
One of: "user", "workspace", "default"
- 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/me/dashboard-layout" \
-H "Authorization: Bearer $TOKEN"Save my dashboard layout
put/api/me/dashboard-layout
Saves the caller's own Dashboard layout in their workspace (Customize). Nobody else's view changes. Any signed-in role may keep one. Unknown cards or fields are a 400. Audited as dashboard.layout_saved. Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: putMyDashboardLayout
Request body (required)
application/json · object
layoutobject3 fields
orderarray of stringThe cards in grid order. A card left out is put at its default place.
hiddenarray of stringCards taken off the grid.
spanmap of stringWidth overrides by card: full (both columns) or half. A card not listed keeps its default (the Agent summary, Status map, Needs you, Totals and Delivery SLA by workflow are full).
Responses
- 200The layout the caller now sees.
Response fields
application/json · object
layoutobject3 fields
orderarray of stringThe cards in grid order. A card left out is put at its default place.
hiddenarray of stringCards taken off the grid.
spanmap of stringWidth overrides by card: full (both columns) or half. A card not listed keeps its default (the Agent summary, Status map, Needs you, Totals and Delivery SLA by workflow are full).
sourcestringWhere it comes from: the caller's own (user), the workspace default (workspace) or the built-in default (default).
One of: "user", "workspace", "default"
- 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 PUT "$ENGINE_URL/api/me/dashboard-layout" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"layout": {
"order": [
"agent"
],
"hidden": [
"agent"
],
"span": {}
}
}'Reset my dashboard layout
delete/api/me/dashboard-layout
Reset layout: drops the caller's own layout and answers what they now see (the workspace default or the built-in one). Audited as dashboard.layout_reset. Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: deleteMyDashboardLayout
Responses
- 200The layout the caller now sees.
Response fields
application/json · object
layoutobject3 fields
orderarray of stringThe cards in grid order. A card left out is put at its default place.
hiddenarray of stringCards taken off the grid.
spanmap of stringWidth overrides by card: full (both columns) or half. A card not listed keeps its default (the Agent summary, Status map, Needs you, Totals and Delivery SLA by workflow are full).
sourcestringWhere it comes from: the caller's own (user), the workspace default (workspace) or the built-in default (default).
One of: "user", "workspace", "default"
- 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 DELETE "$ENGINE_URL/api/me/dashboard-layout" \
-H "Authorization: Bearer $TOKEN"Set the workspace default dashboard layout
put/api/dashboard/default-layout
Makes the layout the workspace's default, shown to everyone in the workspace who has no layout of their own. People's own layouts are untouched. Audited as dashboard.default_layout_saved. Rate limited to 30 requests per minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: putDashboardDefaultLayout
Request body (required)
application/json · object
layoutobject3 fields
orderarray of stringThe cards in grid order. A card left out is put at its default place.
hiddenarray of stringCards taken off the grid.
spanmap of stringWidth overrides by card: full (both columns) or half. A card not listed keeps its default (the Agent summary, Status map, Needs you, Totals and Delivery SLA by workflow are full).
Responses
- 200The layout the caller now sees.
Response fields
application/json · object
layoutobject3 fields
orderarray of stringThe cards in grid order. A card left out is put at its default place.
hiddenarray of stringCards taken off the grid.
spanmap of stringWidth overrides by card: full (both columns) or half. A card not listed keeps its default (the Agent summary, Status map, Needs you, Totals and Delivery SLA by workflow are full).
sourcestringWhere it comes from: the caller's own (user), the workspace default (workspace) or the built-in default (default).
One of: "user", "workspace", "default"
- 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/dashboard/default-layout" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"layout": {
"order": [
"agent"
],
"hidden": [
"agent"
],
"span": {}
}
}'Clear the workspace default dashboard layout
delete/api/dashboard/default-layout
Drops the workspace default: people without a layout of their own see the built-in default again. Audited as dashboard.default_layout_reset. Rate limited to 30 requests per minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: deleteDashboardDefaultLayout
Responses
- 200The layout the caller now sees.
Response fields
application/json · object
layoutobject3 fields
orderarray of stringThe cards in grid order. A card left out is put at its default place.
hiddenarray of stringCards taken off the grid.
spanmap of stringWidth overrides by card: full (both columns) or half. A card not listed keeps its default (the Agent summary, Status map, Needs you, Totals and Delivery SLA by workflow are full).
sourcestringWhere it comes from: the caller's own (user), the workspace default (workspace) or the built-in default (default).
One of: "user", "workspace", "default"
- 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 DELETE "$ENGINE_URL/api/dashboard/default-layout" \
-H "Authorization: Bearer $TOKEN"Agent summary
get/api/dashboard/brief
The Dashboard's "Agent · today so far": the caller's workspace today (the 24 h range) in one paragraph, with chips that link to the problems. Worded by a deterministic template from the dashboard summary and GET /api/attention's sources, the same with AI on or off (no model call). Uses item titles and the names of tunnels, connections and queues, never a sub: no message content; the far side is "their side". When the summary can't be read, the paragraph leaves its numbers out. Cached 30 seconds per workspace; fresh=1 skips that. Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getDashboardBrief
Parameters
| Name | In | Type | Description |
|---|---|---|---|
fresh | query | string | 1 to skip the 30 s cache (after a fix). Anything else is a 400. |
Responses
- 200The brief.
Response fields
application/json · object
textstringOne paragraph for today (the dashboard's 24 h range): "{n} messages so far today, {pct}% delivered (target 99.9%).", what needs the caller first ("One thing / Two things / {N} things need you first: …", past two "and {n} more", or "Nothing urgent needs you."), each queue whose destination is down on their side and will deliver on its own, and "Error budget for the day is {n}% left."
chipsarray of objectLinks to the problems: P1 (err), then queues (warn), up to three, then Messages (accent).
3 fields
labelstringWhat the problem is about: a P1 by its tunnel or connection name (its title when unknown), a queue as "{label} queue"; the last chip is Messages.
tonestringThe dot's tone.
One of: "err", "warn", "accent"
hrefstringThe screen that shows it.
sourcestringHow it was written: a template, never a model call.
One of: "template"
generatedAtstring (date-time)
- 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 "$ENGINE_URL/api/dashboard/brief" \
-H "Authorization: Bearer $TOKEN"The read-only dashboard link
get/api/dashboard/share-links
The workspace's live read-only Dashboard link: when it was made and by whom, when it expires and how often it was opened (opens count once per visitor session), or null; links lists the workspace's active links (one at most: making a link revokes the earlier). Never the token: only its hash is kept. Rate limited to 30 requests per minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: getDashboardShareLink
Responses
- 200The live link, or null.
Response fields
application/json · object
linkobject | null6 fields
idstringcreatedAtstring (date-time)createdBystring | nullWho made it.
expiresAtstring (date-time)openCountintegerHow often the page was opened.
lastOpenedAtstring (date-time) | null
linksarray of object6 fields
idstringcreatedAtstring (date-time)createdBystring | nullWho made it.
expiresAtstring (date-time)openCountintegerHow often the page was opened.
lastOpenedAtstring (date-time) | null
- 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/dashboard/share-links" \
-H "Authorization: Bearer $TOKEN"Make a read-only dashboard link
post/api/dashboard/share-links
Makes a read-only link to the workspace's Dashboard, valid for 30 days, and revokes the earlier one. Anyone with it sees the trends and status (totals, volume, error budget, delivery by workflow) without signing in, and can change the range; no message data or PHI. The answer holds the page's url, {engine public origin}/s/dash-{token} (22 base62 characters, 128 random bits), and its path, once. Takes no body. Audited as dashboard.share_link_created with the id and expiry only. Rate limited to 10 requests per minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: createDashboardShareLink
Responses
- 201The new link; its url is shown only now.
Response fields
application/json · object
idstringurlstring{engine public origin}/s/dash-{token}
pathstring/s/dash-{token}
createdAtstring (date-time)expiresAtstring (date-time)openCountinteger
- 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 POST "$ENGINE_URL/api/dashboard/share-links" \
-H "Authorization: Bearer $TOKEN"Revoke the read-only dashboard link
delete/api/dashboard/share-links/{id}
Revokes the workspace's read-only link: its page stops working at once. 404 when no live link with that id is in the workspace. Audited as dashboard.share_link_revoked. Rate limited to 10 requests per minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: revokeDashboardShareLink
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | The link's id. |
Responses
- 200Revoked.
Response fields
application/json · object
revokedboolean
- 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 DELETE "$ENGINE_URL/api/dashboard/share-links/<id>" \
-H "Authorization: Bearer $TOKEN"A shared dashboard (public)
get/api/share/dashboard/{token}
Public: the token is the credential and names the workspace; the IP allowlist still applies. The workspace's shared dashboard for the range: the summary cut down to totals, buckets and per-workflow delivery (no attention items, ids, trigger detail or message data; a trigger is its kind only), the Status map (names and states, no links, opaque ids), Needs you as counts by priority, and the public Engine services rows (no links); and when the link expires. open=1, sent once when the page loads, counts an open and is audited as dashboard.share_link_opened once per visitor session: the answer sets the session cookie mh-share-{first 16 hex of sha256(link id)} (HttpOnly, SameSite=Strict, this path), and an open that sends it back is not counted; no IP is kept for this. At most 10 opens per link per minute are counted and audited; past that the dashboard still answers, with no openCount and no cookie. 404 for a token that is unknown, expired or revoked; 400 for any other parameter. no-store, no-referrer, noindex. Kept 30 s per workspace and range. Rate limited to 30 requests per minute per IP.
Auth: None, public route · Operation: getSharedDashboard
Parameters
| Name | In | Type | Description |
|---|---|---|---|
tokenrequired | path | string | The link's token. |
range | query | string | The range. |
open | query | string | 1 to count an open. |
Responses
- 200The shared dashboard.
Response fields
application/json · object
summaryobjectThe dashboard summary's shape (GET /api/dashboard/summary) with only totals, buckets and per-workflow delivery filled.
mapobjectThe Status map as drawn: height, nodes (id n1…, column, x, y, name, meta, status, label, title) and edges (from, to, d, tone). No links.
needsYouobject4 fields
openintegerp1integerp2integerp3integer
servicesarray of object4 fields
namestringsubstringvaluestringtonestringOne of: "ok", "warn", "err", "mu"
expiresAtstring (date-time)openCountintegerWith open=1, when the open counted: the new open count.
- 400The request is malformed or fails validation.
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/share/dashboard/<token>"Engine services
get/api/dashboard/services
The GET /api/health body for the signed-in dashboard's Engine services card, plus what the public probe leaves out: the Postgres major version and replica count, and the execution archive's location (the bucket from EXECUTION_ARCHIVE_URI, reduced to scheme and bucket, or the directory). Engines counts the replicas whose heartbeat is fresh against MEDHOOK_DESIRED_REPLICAS; Agent reports today's AI budget used. Always 200 with the body, whatever status says. Engine-wide, no message content, never reads executions. Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getDashboardServices
Responses
- 200The engine services.
Response fields
application/json · object
statusstringOne of: "healthy", "degraded", "unhealthy"
platformstringgcp when GCP_PROJECT_ID is set.
One of: "gcp", "other"
checksobject5 fields
postgresobject4 fields
statusstringup, down or timeout.
latencyintegerms.
versionintegerPostgres major version, e.g. 15 (this route only, never /api/health).
replicasintegerReplicas streaming from it (pg_stat_replication; this route only). Left out when the role can't read it.
objectStorageobject3 fields
kindstringWhere the execution archive lives.
One of: "gcs", "s3", "directory", "none"
statusstringok, misconfigured or off.
uristringgs://bucket or s3://bucket from EXECUTION_ARCHIVE_URI (scheme and bucket only), else the EXECUTION_ARCHIVE_DIR directory. This route only.
workQueueobject5 fields
kindstringThe queue: local (the engine's in-process queue).
One of: "local"
statusstringok or backlog.
runningintegerpendingintegercapacityinteger
enginesobject6 fields
statusstringup: this replica answered.
kindstringkubernetes (pods) or process.
One of: "kubernetes", "process"
versionstringThis replica's release version.
commitstring | nullFirst 7 characters of its commit, or null.
readyintegerEngine replicas whose heartbeat is under 60 s old (each beats every 20 s), at least 1. Left out when the heartbeat table can't be read in time.
desiredintegerMEDHOOK_DESIRED_REPLICAS (Helm: replicaCount or the HPA's minReplicas, plus the MLLP-role engine), else ready.
agentobject4 fields
statusstringoff (AI features are off: they need a BAA), unconfigured (no AI provider can take calls) or on.
One of: "off", "unconfigured", "on"
providerstringanthropic or vertex.
One of: "anthropic", "vertex"
budgetUsedPctinteger | nullThe larger share of today's engine-wide AI token and iteration budget used, 0–100; null when neither is capped (unlimited). Left out when the budget can't be read in time.
exhaustedbooleanToday's budget is used up: the Agent is paused.
versionstring
- 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/dashboard/services" \
-H "Authorization: Bearer $TOKEN"What needs attention
get/api/attention
The caller's workspace, ranked for the dashboard's Needs you card and the nav badges: P1 tunnels down, degraded or failed to provision (with the diagnosed cause and the workflows waiting behind a down one) and adapters whose auth is failing or that are not answering (live calls when known, else the latest connection test; only the HTTP status and OAuth error code are shown); P2 destination queues that are open, blocked or paused, the ACK queue, workflows whose latest run in the last 7 days failed (how many runs of the current failure streak failed at which step, and a newer version waiting for approval), tunnels failed over, and overdue or expired items; P3 adapters rate limited (1% or more of calls got 429), PSK rotations due and Secret Manager secrets expiring within 14 days, and unopened one-time PSK links expiring within 2 days. Oldest first inside a priority; resolved items (a tunnel the watcher sees recovering) last. badges counts the same list. upcoming is for the Expiring soon card only and is never counted in open or badges: what expires past the 14-day window, however far out: the engine TLS certificate (read from the engine's public https address, cached 24 hours; Auto-renews when the chart manages the certificate), the engine JWKS signing key and adapter API tokens with an expiry; a source that fails is left out. Workflows that were deleted or are disabled are not listed; PSK reminders are only for tunnels in service. Names, counts and states only: no message content and no error text. The destination queue and ACK queue listings are reused for 10 seconds per workspace; fresh=1 skips that. Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getAttention
Parameters
| Name | In | Type | Description |
|---|---|---|---|
fresh | query | string | 1 to skip the 10 s memo (sent right after a mutation). Anything else is a 400. |
tz | query | string | The viewer's IANA time zone (America/Chicago). Every "since HH:MM" and today's/yesterday's in |
Responses
- 200The list and the badges.
Response fields
application/json · object
itemsarray of object13 fields
idstringStable across fetches, e.g. "tunnel:<id>:down".
prioritystringP1 first.
One of: "P1", "P2", "P3"
kindstringOne of: "tunnel", "adapter", "queue", "workflow", "expiry", "approval"
titlestringsubstring"resolved" on a resolved item.
sincestring (date-time)When it started; for an expiry, 14 days before it.
dueAtstring (date-time)Expiries: when it expires or expired.
subjectobjectExpiries: what expires (the Expiring soon card).
2 fields
namestringThe tunnel or secret name.
kindstringOne of: "tunnel PSK", "one-time PSK link", "secret"
hrefstringThe page that fixes it.
actionstringThe button label, e.g. "Diagnose", "Fix", "Rotate".
resolvedbooleanmessagesintegerMessages this item holds waiting on a person (badges.messages counts the Needs action groups).
metaobjectThe source's own state, for the badges and the status map.
2 fields
statestringAdapters: auth (auth failing), unreach (not answering) or rate (rate limited). Queues: the queue state.
depthintegerQueues: messages waiting.
upcomingarray of object6 fields
idstringStable, e.g. "upcoming:tls:<host>".
namestringThe host, key owner or adapter.
kindstringOne of: "TLS certificate", "JWKS signing key", "API token"
dueAtstring (date-time)When it expires.
actionstringThe action label: "Rotate", "View" or "Auto-renews".
hrefstring | nullThe page that does it; null for Auto-renews (plain text).
openintegerItems not resolved.
badgesobject4 fields
workflowsintegerWorkflows whose latest run in the last 7 days failed.
messagesintegerWhat needs action: the messages in the Needs action groups (GET /api/messages/groups
needAction), the same count as the Messages header and its Needs action tab. Failed messages of the last 7 days (not discarded, and not while a replay of them is on its way) plus the messages waiting in open, probing or paused destination queues.tunnelsintegerTunnels down, degraded, failed over or failed to provision.
adaptersintegerAdapter profiles whose auth is failing or that are not answering (live calls, else the latest connection test); rate limited ones are not counted.
generatedAtstring (date-time)
- 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 "$ENGINE_URL/api/attention" \
-H "Authorization: Bearer $TOKEN"Dashboard summary
get/api/dashboard/summary
The caller's workspace over a range (24h by default, 7d, 30d or 90d): key figures (messages, delivered percentage against the 99.9% target, p95 latency against the 2 s target, error budget left, ACK queue size), hourly buckets for 24h and daily otherwise, one row per workflow with its delivered percentage, error budget left and a 12-point trend, the retention coverage, and the items that need attention (ACK queue, workflows whose last run failed, adapters whose latest connection test failed). The error budget is 0.1% of finished messages; a failed message and a completed one that took 2 s or longer both use it. Computed with SQL aggregates. Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getDashboardSummary
Parameters
| Name | In | Type | Description |
|---|---|---|---|
range | query | string | The period, ending now. Anything else is a 400. |
Responses
- 200The summary.
Response fields
application/json · object
rangestringOne of: "24h", "7d", "30d", "90d"
labelstringThe Totals title, e.g. "Last 7 days".
granularitystringhour for 24h, day otherwise.
One of: "hour", "day"
windowobject2 fields
fromstring (date-time)tostring (date-time)
coverageFromstring (date-time)Where the data starts: window.from, or the oldest kept execution when that is later (retention, or an engine newer than the range).
coverageCompletebooleanFalse when coverageFrom is after window.from.
targetsobject2 fields
deliveredPctnumberDelivered target, 99.9.
p95Msintegerp95 time-to-deliver target, 2000.
kpisobject19 fields
messagesintegerpreviousMessagesintegerMessages in the previous period of the same length.
previousCoverageCompletebooleanFalse when the oldest kept execution is after the previous period's start (or none is kept); deltaPct is then null.
deltaPctinteger | nullMessages vs the previous period, in percent; null with no previous messages or a partly kept previous period.
acceptedintegerrejectedintegerrejectedAEintegerrejectedARintegerrejectedSplitCompletebooleanFalse when the failures had more than 2,000 distinct error texts: the rest count as AE, so rejectedAR is a lower bound.
lateintegeracceptedPctnumber | nullAccepted over finished, one decimal.
deliveredPctnumber | nullAccepted over finished, two decimals.
errorBudgetLeftPctnumber | null0–100: 0.1% of finished messages may fail or be late; rounded down.
p95Msinteger | nullslowestWorkflowstring | nullackQueueintegerneedsFixintegerdeadLetterintegerretryinginteger
bucketsarray of object6 fields
startstring (date-time)UTC hour or day start.
acceptedintegerrejectedintegerlateintegerCompleted, but slower than the p95 target.
totalintegerbudgetLeftPctnumber | nullError budget left at the end of this bucket.
hourlyarray of objectDeprecated: the bucket series under its 24 h name.
houris the bucket start, so a UTC day on 7d, 30d and 90d.5 fields
hourstring (date-time)acceptedintegerrejectedintegerlateintegerCompleted, but slower than the p95 target.
totalinteger
workflowsarray of object11 fields
idstringnamestringtriggerstringmessagesintegererrorsintegerlateintegerp95Msinteger | nulldeliveredPctnumber | nullTwo decimals.
budgetLeftPctnumber | nullError budget left for this workflow.
trendarray of number | nullDelivered % per 12th of the range, oldest first; null where nothing finished.
statusstringOne of: "ok", "err", "warn", "neutral"
attentionarray of object4 fields
kindstringtextstringtonestringhrefstring
budgetEventsarray of objectBuckets where error budget use jumped (at least twice an even burn), oldest first (G-dashboard-3).
5 fields
startstring (date-time)The bucket's start.
atstring (date-time)The first failed or late message of that name in it.
namestringThe destination, the tunnel behind it for buckets in its outage when every tunnel behind the workflow is down (watcher down, or failed to provision), or the workflow. Names only.
kindstringOne of: "workflow", "destination", "tunnel"
sharePctintegerIts share of the budget used over the range.
budgetCauseobject | nullThe name that used the most of the range's budget; null with none used.
3 fields
namestringkindstringOne of: "workflow", "destination", "tunnel"
sharePctinteger
budgetPacestringThe last quarter of the range against an even burn: on-pace within 5 points; faster once spent.
One of: "slower", "on-pace", "faster"
- 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 "$ENGINE_URL/api/dashboard/summary" \
-H "Authorization: Bearer $TOKEN"List event log entries
get/api/events
The engine event log for process mining, newest first, in the caller's workspace. Events name engine objects (workflow, run, connection, trigger, step, user) and carry allow-listed attributes only: never message content, source values, error text from a source or file names. Kept EVENT_LOG_RETENTION_DAYS (default 30).
Minimum role: operator.
Auth: Bearer token (how to get one) · Operation: listEvents
Parameters
| Name | In | Type | Description |
|---|---|---|---|
from | query | string | Earliest |
to | query | string | Latest |
family | query | string |
|
activity | query | string | One activity name from the event catalog, e.g. |
workflowId | query | string | Only events about this workflow. |
executionId | query | string | Only events about this run. |
limit | query | integer | Page size, 1 to 1,000 (default 100). |
cursor | query | string |
|
Responses
- 200A page of events.
Response fields
application/json · object
eventsarray of object18 fields
idstringEvent id (UUID).
occurredAtstring (date-time)When it happened.
workspaceIdstringfamilystringjourney,messageortrigger.activitystringThe activity, a name from the event catalog.
outcomestring | nullok,failed,skippedorwaiting, or null.actorKindstring | nulluser,api-clientorsystem, or null.actorIdstring | nullEngine user id or API client id (never an email).
actorRolestring | nullworkflowIdstring | nullworkflowVersioninteger | nullexecutionIdstring | nulladapterProfileIdstring | nulltriggerIdstring | nullstepIdstring | nulldurationMsinteger | nullrequestIdstring | nullattrsobjectThe activity's allow-listed attributes (identifiers, counts, flags), or null.
nextCursorstring | nullCursor for the next page, or null at the end.
- 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 "$ENGINE_URL/api/events" \
-H "Authorization: Bearer $TOKEN"Export the event log as OCEL 2.0
get/api/events/export
Downloads the workspace's events in a range as OCEL 2.0 JSON (objectTypes, eventTypes, objects, events with relationships), oldest first, streamed. Load it with pm4py.read_ocel2_json. Without from/to it covers the last day; a range longer than 31 days is a 400 RANGE_TOO_LONG. X-Export-Events is the event count. Audited as events.exported with the range and the count. 10 requests a minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: exportEventsOcel
Parameters
| Name | In | Type | Description |
|---|---|---|---|
format | query | string |
|
from | query | string | Earliest |
to | query | string | Latest |
family | query | string |
|
activity | query | string | One activity name from the event catalog, e.g. |
workflowId | query | string | Only events about this workflow. |
executionId | query | string | Only events about this run. |
Responses
- 200The OCEL 2.0 JSON log, as an attachment (`medhook-events-YYYY-MM-DD.ocel.json`).
Response fields
application/json · object
objectTypesarray of objecteventTypesarray of objectobjectsarray of objecteventsarray 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
- 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/events/export" \
-H "Authorization: Bearer $TOKEN"Set up the Demo Health sandbox
post/api/welcome/demo-workspace
Explore the demo on /welcome: makes the Demo Health sandbox on demand, never at install. Workspace "demo" (Demo Health sandbox) gets the draft workflow Demo ADT intake (Check HL7, Map ward, then three local destinations: a Demo Health MLLP stub, a local FHIR store and a local file writer), a ward code table, synthetic ADT traffic from the Demo Health sample generator and a pinned ADT^A08 test case that fails at step 3 (ward 5E is not mapped). Synthetic data only, no PHI; the workflow is off, so nothing is delivered, and its MLLP trigger takes only the generator's test traffic (MSH-3 MEDHOOK-SYN, MSH-11 T), so no live message lands in the sandbox. Once made, every signed-in person may open it without a membership, as a viewer (its dry run and test-case run at most as an operator). Idempotent: once the sandbox exists it is left as it is. Takes no body. Audited as workspace.demo_seeded. Rate limited to 5 requests per minute.
Minimum role: admin.
Auth: Bearer token (how to get one) · Operation: seedDemoWorkspace
Responses
- 200The sandbox was already there.
Response fields
application/json · object
workspaceIdstringThe sandbox workspace: always "demo".
workflowIdstringIts practice workflow, Demo ADT intake.
- 201The sandbox was made.
Response fields
application/json · object
workspaceIdstringThe sandbox workspace: always "demo".
workflowIdstringIts practice workflow, Demo ADT intake.
- 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/welcome/demo-workspace" \
-H "Authorization: Bearer $TOKEN"Recent changes
get/api/dashboard/changes
The caller's workspace's latest deploys and rollbacks, deploy approval requests, PSK rotations (and failed rotations) and failovers from the audit log, the last 30 days, newest first. Each is worded with a toned note and links to the workflow's Versions or the tunnel's Events. A live deploy reads live · canary passed (a later canary promotion of that version), live · 0 errors (no failed or partial run since the deploy) or live; a replaced one replaced by v{n}. A pending approval request reads {what changed} in {workflow} (draft v{n}), awaiting approval. A PSK rotation later rolled back reads rolled back to v{n} for 24 h; one whose one-time link was never opened is flagged (err while the tunnel is down). Canary promotions and PSK rollbacks fold into those rows and are never rows of their own. Names and versions only: no message content. The only executions read is one index probe per live deploy listed (a failed run since its deploy, never a count). Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getDashboardChanges
Parameters
| Name | In | Type | Description |
|---|---|---|---|
limit | query | integer | How many, 1 to 20. Anything else is a 400. |
Responses
- 200The changes.
Response fields
application/json · object
itemsarray of object6 fields
idstringThe audit event id.
atstring (date-time)textstringe.g. "ADT intake v4 deployed by CJ".
notestringe.g. "live", "awaiting approval", "link never opened: likely cause of today's outage".
tonestringOne of: "ok", "warn", "err", "neutral"
hrefstringThe workflow or tunnel page.
generatedAtstring (date-time)
- 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 "$ENGINE_URL/api/dashboard/changes" \
-H "Authorization: Bearer $TOKEN"Status map
get/api/dashboard/map
The structure of every path in the caller's workspace for the dashboard's Status map: sources (tunnels not being torn down, and the kinds of trigger in use), every workflow, and the saved connections its adapter steps deliver to, with the links between them. Reads workflows, tunnels and adapter profiles only, never executions; problem states come from GET /api/attention and volumes from GET /api/dashboard/summary. Takes no parameters. Rate limited to 60 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getDashboardMap
Responses
- 200The map.
Response fields
application/json · object
sourcesarray of object5 fields
idstring"tunnel:<id>", "trigger:<type>", "workflow:<id>" or "adapter:<id>".
namestringhrefstringIts page.
kindstringOne of: "tunnel", "trigger"
readybooleanFalse for a tunnel that is not in service.
workflowsarray of object4 fields
idstring"tunnel:<id>", "trigger:<type>", "workflow:<id>" or "adapter:<id>".
namestringhrefstringIts page.
enabledboolean
destinationsarray of object4 fields
idstring"tunnel:<id>", "trigger:<type>", "workflow:<id>" or "adapter:<id>".
namestringhrefstringIts page.
lanesarray of stringIts destination queue lanes, one per adapter step.
linksarray of objectSource → workflow and workflow → destination.
2 fields
fromstringtostring
- 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 "$ENGINE_URL/api/dashboard/map" \
-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.
HealthCheck
statusstringrequiredOne of: "healthy", "degraded", "unhealthy"
checksobjectrequired12 fields
redisobjectrequired2 fields
statusstringlatencynumberLatency in ms.
postgresobjectrequired2 fields
statusstringlatencynumber
medplumobjectrequired2 fields
statusstringlatencynumber
mllpobjectrequired2 fields
statusstringlatencynumber
licenseobjectrequired2 fields
statusstringexpiresAtstring (date-time) | null
fhirStoreobject3 fields
kindstringOne of: "medplum", "gcp-healthcare", "none"
statusstringup, down or timeout (Medplum, probed); configured (Cloud Healthcare, probed by /api/fhir-store); misconfigured.
latencyintegerMedplum probe, ms.
objectStorageobject2 fields
kindstringOne of: "directory", "none"
statusstringThe execution archive.
One of: "ok", "off", "misconfigured"
workQueueobject4 fields
statusstringbacklog once waiting work reaches capacity.
One of: "ok", "backlog"
runningintegerpendingintegercapacityinteger
enginesobjectThe replica that answered.
2 fields
statusstringOne of: "up"
versionstring
agentobject1 field
statusstringon when AI features are on and a provider is set.
One of: "on", "off"
sandboxobjectrequiredHow custom JavaScript and condition expressions run: isolated-vm, unsafe-vm (SANDBOX_ALLOW_UNSAFE_VM=true, local development only) or unavailable (they refuse to run). Anything but isolated-vm is degraded.
1 field
statusstringOne of: "isolated-vm", "unsafe-vm", "unavailable"
memoryobjectrequired2 fields
statusstringusagenumberHeap utilisation percentage (0-100).
platformstringgcp when the engine runs on Google Cloud.
One of: "gcp", "other"
versionstringrequireduptimenumberrequiredProcess uptime in seconds.
executionQueueobject3 fields
runningintegerpendingintegercapacityinteger