Skip to content
Engine API

System

System endpoints of the MedHook engine API: 29 operations with parameters, schemas and a curl example for each.

On this page

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
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
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

    • readybooleanrequired
    • checksobjectrequired
      3 fields
      • postgresstringrequired
      • redisstringrequired
      • licensestringrequired
  • 503At least one dependency is unreachable, timed out, or invalid.
    Response fields

    application/json · object

    • readybooleanrequired
    • checksobjectrequired
      3 fields
      • postgresstringrequired
      • redisstringrequired
      • licensestringrequired

Example request

curl
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

    • versionstringrequired
    • namestringrequired
    • commitstring | nullrequired

      Git commit SHA at build time (from GIT_COMMIT_SHA env).

    • buildDatestring | nullrequired

      Build timestamp (from BUILD_DATE env).

    • nodestringrequired

      process.version of the running Node.js runtime.

    • fhirVersionsarray of stringrequired
    • adaptersarray of stringrequired

      Registered adapter type identifiers.

    • featuresobjectrequired
      5 fields
      • aiAvailablebooleanrequired

        True when there is a configured AI provider (ANTHROPIC_API_KEY, or AI_PROVIDER=vertex with AI_VERTEX_PROJECT and AI_VERTEX_REGION).

      • phiEnforcementbooleanrequired

        True unless SKIP_LICENSE_VALIDATION=true (dev/test only).

      • graphqlEnabledbooleanrequired

        True when GRAPHQL_ENABLED=true; /api/graphql is a 404 otherwise.

      • flatFieldPathsbooleanrequired

        True when FLAT_FIELD_PATHS_ENABLED=true (off by default): the flat field-path view for HL7 v2 and JSON samples.

      • sampleFetchbooleanrequired

        False 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
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

  • 200Prometheus text format.

    text/plain · string

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
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 objectrequired
    4 fields
    • methodstringrequired
    • urlstringrequired
    • bodyany
    • headersmap of string

Responses

  • 200One result per sub-request, in order.
    Response fields

    application/json · object

    • resultsarray of object
      4 fields
      • statusinteger
      • dataany
      • errorstring
      • urlstring
    • 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
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

NameInTypeDescription
queryquerystring

The GraphQL query.

Responses

  • 200A standard GraphQL response.

    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

Example request

curl
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

  • querystringrequired
  • variablesobject
  • operationNamestring

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
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
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

    • statusstring
    • summaryobject
    • checksarray of object
      5 fields
      • idstring
      • namestring
      • categorystring

        One of: "config", "database", "redis", "license", "network", "system"

      • statusstring

        One of: "pass", "fail", "warn", "skip"

      • severitystring

        One 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
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

  • sectionsobject
    6 fields
    • checksboolean
    • configboolean
    • tunnelsboolean
    • executionsboolean
    • ackQueueboolean
    • samplesboolean

      Off 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
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

    • layoutobject
      3 fields
      • orderarray of string

        The cards in grid order. A card left out is put at its default place.

      • hiddenarray of string

        Cards taken off the grid.

      • spanmap of string

        Width 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).

    • sourcestring

      Where 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
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

  • layoutobject
    3 fields
    • orderarray of string

      The cards in grid order. A card left out is put at its default place.

    • hiddenarray of string

      Cards taken off the grid.

    • spanmap of string

      Width 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

    • layoutobject
      3 fields
      • orderarray of string

        The cards in grid order. A card left out is put at its default place.

      • hiddenarray of string

        Cards taken off the grid.

      • spanmap of string

        Width 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).

    • sourcestring

      Where 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
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

    • layoutobject
      3 fields
      • orderarray of string

        The cards in grid order. A card left out is put at its default place.

      • hiddenarray of string

        Cards taken off the grid.

      • spanmap of string

        Width 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).

    • sourcestring

      Where 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
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

  • layoutobject
    3 fields
    • orderarray of string

      The cards in grid order. A card left out is put at its default place.

    • hiddenarray of string

      Cards taken off the grid.

    • spanmap of string

      Width 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

    • layoutobject
      3 fields
      • orderarray of string

        The cards in grid order. A card left out is put at its default place.

      • hiddenarray of string

        Cards taken off the grid.

      • spanmap of string

        Width 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).

    • sourcestring

      Where 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
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

    • layoutobject
      3 fields
      • orderarray of string

        The cards in grid order. A card left out is put at its default place.

      • hiddenarray of string

        Cards taken off the grid.

      • spanmap of string

        Width 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).

    • sourcestring

      Where 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
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

NameInTypeDescription
freshquerystring

1 to skip the 30 s cache (after a fix). Anything else is a 400.

Responses

  • 200The brief.
    Response fields

    application/json · object

    • textstring

      One 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 object

      Links to the problems: P1 (err), then queues (warn), up to three, then Messages (accent).

      3 fields
      • labelstring

        What 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.

      • tonestring

        The dot's tone.

        One of: "err", "warn", "accent"

      • hrefstring

        The screen that shows it.

    • sourcestring

      How 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
curl "$ENGINE_URL/api/dashboard/brief" \
  -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

    • idstring
    • urlstring

      {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
curl -X POST "$ENGINE_URL/api/dashboard/share-links" \
  -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

NameInTypeDescription
tokenrequiredpathstring

The link's token.

rangequerystring

The range.

openquerystring

1 to count an open.

Responses

  • 200The shared dashboard.
    Response fields

    application/json · object

    • summaryobject

      The dashboard summary's shape (GET /api/dashboard/summary) with only totals, buckets and per-workflow delivery filled.

    • mapobject

      The Status map as drawn: height, nodes (id n1…, column, x, y, name, meta, status, label, title) and edges (from, to, d, tone). No links.

    • needsYouobject
      4 fields
      • openinteger
      • p1integer
      • p2integer
      • p3integer
    • servicesarray of object
      4 fields
      • namestring
      • substring
      • valuestring
      • tonestring

        One of: "ok", "warn", "err", "mu"

    • expiresAtstring (date-time)
    • openCountinteger

      With 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
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

    • statusstring

      One of: "healthy", "degraded", "unhealthy"

    • platformstring

      gcp when GCP_PROJECT_ID is set.

      One of: "gcp", "other"

    • checksobject
      5 fields
      • postgresobject
        4 fields
        • statusstring

          up, down or timeout.

        • latencyinteger

          ms.

        • versioninteger

          Postgres major version, e.g. 15 (this route only, never /api/health).

        • replicasinteger

          Replicas streaming from it (pg_stat_replication; this route only). Left out when the role can't read it.

      • objectStorageobject
        3 fields
        • kindstring

          Where the execution archive lives.

          One of: "gcs", "s3", "directory", "none"

        • statusstring

          ok, misconfigured or off.

        • uristring

          gs://bucket or s3://bucket from EXECUTION_ARCHIVE_URI (scheme and bucket only), else the EXECUTION_ARCHIVE_DIR directory. This route only.

      • workQueueobject
        5 fields
        • kindstring

          The queue: local (the engine's in-process queue).

          One of: "local"

        • statusstring

          ok or backlog.

        • runninginteger
        • pendinginteger
        • capacityinteger
      • enginesobject
        6 fields
        • statusstring

          up: this replica answered.

        • kindstring

          kubernetes (pods) or process.

          One of: "kubernetes", "process"

        • versionstring

          This replica's release version.

        • commitstring | null

          First 7 characters of its commit, or null.

        • readyinteger

          Engine 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.

        • desiredinteger

          MEDHOOK_DESIRED_REPLICAS (Helm: replicaCount or the HPA's minReplicas, plus the MLLP-role engine), else ready.

      • agentobject
        4 fields
        • statusstring

          off (AI features are off: they need a BAA), unconfigured (no AI provider can take calls) or on.

          One of: "off", "unconfigured", "on"

        • providerstring

          anthropic or vertex.

          One of: "anthropic", "vertex"

        • budgetUsedPctinteger | null

          The 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.

        • exhaustedboolean

          Today'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
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

NameInTypeDescription
freshquerystring

1 to skip the 10 s memo (sent right after a mutation). Anything else is a 400.

tzquerystring

The viewer's IANA time zone (America/Chicago). Every "since HH:MM" and today's/yesterday's in sub is worded in it; the engine's zone when absent or when the engine cannot resolve it (a browser reporting Etc/Unknown). Only a malformed name is a 400.

Responses

  • 200The list and the badges.
    Response fields

    application/json · object

    • itemsarray of object
      13 fields
      • idstring

        Stable across fetches, e.g. "tunnel:<id>:down".

      • prioritystring

        P1 first.

        One of: "P1", "P2", "P3"

      • kindstring

        One of: "tunnel", "adapter", "queue", "workflow", "expiry", "approval"

      • titlestring
      • substring

        "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.

      • subjectobject

        Expiries: what expires (the Expiring soon card).

        2 fields
        • namestring

          The tunnel or secret name.

        • kindstring

          One of: "tunnel PSK", "one-time PSK link", "secret"

      • hrefstring

        The page that fixes it.

      • actionstring

        The button label, e.g. "Diagnose", "Fix", "Rotate".

      • resolvedboolean
      • messagesinteger

        Messages this item holds waiting on a person (badges.messages counts the Needs action groups).

      • metaobject

        The source's own state, for the badges and the status map.

        2 fields
        • statestring

          Adapters: auth (auth failing), unreach (not answering) or rate (rate limited). Queues: the queue state.

        • depthinteger

          Queues: messages waiting.

    • upcomingarray of object
      6 fields
      • idstring

        Stable, e.g. "upcoming:tls:<host>".

      • namestring

        The host, key owner or adapter.

      • kindstring

        One of: "TLS certificate", "JWKS signing key", "API token"

      • dueAtstring (date-time)

        When it expires.

      • actionstring

        The action label: "Rotate", "View" or "Auto-renews".

      • hrefstring | null

        The page that does it; null for Auto-renews (plain text).

    • openinteger

      Items not resolved.

    • badgesobject
      4 fields
      • workflowsinteger

        Workflows whose latest run in the last 7 days failed.

      • messagesinteger

        What 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.

      • tunnelsinteger

        Tunnels down, degraded, failed over or failed to provision.

      • adaptersinteger

        Adapter 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
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

NameInTypeDescription
rangequerystring

The period, ending now. Anything else is a 400.

Responses

  • 200The summary.
    Response fields

    application/json · object

    • rangestring

      One of: "24h", "7d", "30d", "90d"

    • labelstring

      The Totals title, e.g. "Last 7 days".

    • granularitystring

      hour for 24h, day otherwise.

      One of: "hour", "day"

    • windowobject
      2 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).

    • coverageCompleteboolean

      False when coverageFrom is after window.from.

    • targetsobject
      2 fields
      • deliveredPctnumber

        Delivered target, 99.9.

      • p95Msinteger

        p95 time-to-deliver target, 2000.

    • kpisobject
      19 fields
      • messagesinteger
      • previousMessagesinteger

        Messages in the previous period of the same length.

      • previousCoverageCompleteboolean

        False when the oldest kept execution is after the previous period's start (or none is kept); deltaPct is then null.

      • deltaPctinteger | null

        Messages vs the previous period, in percent; null with no previous messages or a partly kept previous period.

      • acceptedinteger
      • rejectedinteger
      • rejectedAEinteger
      • rejectedARinteger
      • rejectedSplitCompleteboolean

        False when the failures had more than 2,000 distinct error texts: the rest count as AE, so rejectedAR is a lower bound.

      • lateinteger
      • acceptedPctnumber | null

        Accepted over finished, one decimal.

      • deliveredPctnumber | null

        Accepted over finished, two decimals.

      • errorBudgetLeftPctnumber | null

        0–100: 0.1% of finished messages may fail or be late; rounded down.

      • p95Msinteger | null
      • slowestWorkflowstring | null
      • ackQueueinteger
      • needsFixinteger
      • deadLetterinteger
      • retryinginteger
    • bucketsarray of object
      6 fields
      • startstring (date-time)

        UTC hour or day start.

      • acceptedinteger
      • rejectedinteger
      • lateinteger

        Completed, but slower than the p95 target.

      • totalinteger
      • budgetLeftPctnumber | null

        Error budget left at the end of this bucket.

    • hourlyarray of object

      Deprecated: the bucket series under its 24 h name. hour is the bucket start, so a UTC day on 7d, 30d and 90d.

      5 fields
      • hourstring (date-time)
      • acceptedinteger
      • rejectedinteger
      • lateinteger

        Completed, but slower than the p95 target.

      • totalinteger
    • workflowsarray of object
      11 fields
      • idstring
      • namestring
      • triggerstring
      • messagesinteger
      • errorsinteger
      • lateinteger
      • p95Msinteger | null
      • deliveredPctnumber | null

        Two decimals.

      • budgetLeftPctnumber | null

        Error budget left for this workflow.

      • trendarray of number | null

        Delivered % per 12th of the range, oldest first; null where nothing finished.

      • statusstring

        One of: "ok", "err", "warn", "neutral"

    • attentionarray of object
      4 fields
      • kindstring
      • textstring
      • tonestring
      • hrefstring
    • budgetEventsarray of object

      Buckets 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.

      • namestring

        The 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.

      • kindstring

        One of: "workflow", "destination", "tunnel"

      • sharePctinteger

        Its share of the budget used over the range.

    • budgetCauseobject | null

      The name that used the most of the range's budget; null with none used.

      3 fields
      • namestring
      • kindstring

        One of: "workflow", "destination", "tunnel"

      • sharePctinteger
    • budgetPacestring

      The 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
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

NameInTypeDescription
fromquerystring

Earliest occurredAt, ISO 8601.

toquerystring

Latest occurredAt, ISO 8601.

familyquerystring

journey, message or trigger.

activityquerystring

One activity name from the event catalog, e.g. connection.tested.

workflowIdquerystring

Only events about this workflow.

executionIdquerystring

Only events about this run.

limitqueryinteger

Page size, 1 to 1,000 (default 100).

cursorquerystring

nextCursor from the previous page.

Responses

  • 200A page of events.
    Response fields

    application/json · object

    • eventsarray of object
      18 fields
      • idstring

        Event id (UUID).

      • occurredAtstring (date-time)

        When it happened.

      • workspaceIdstring
      • familystring

        journey, message or trigger.

      • activitystring

        The activity, a name from the event catalog.

      • outcomestring | null

        ok, failed, skipped or waiting, or null.

      • actorKindstring | null

        user, api-client or system, or null.

      • actorIdstring | null

        Engine user id or API client id (never an email).

      • actorRolestring | null
      • workflowIdstring | null
      • workflowVersioninteger | null
      • executionIdstring | null
      • adapterProfileIdstring | null
      • triggerIdstring | null
      • stepIdstring | null
      • durationMsinteger | null
      • requestIdstring | null
      • attrsobject

        The activity's allow-listed attributes (identifiers, counts, flags), or null.

    • nextCursorstring | null

      Cursor 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
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

NameInTypeDescription
formatquerystring

ocel2 (the default and only format).

fromquerystring

Earliest occurredAt, ISO 8601.

toquerystring

Latest occurredAt, ISO 8601.

familyquerystring

journey, message or trigger.

activityquerystring

One activity name from the event catalog, e.g. connection.tested.

workflowIdquerystring

Only events about this workflow.

executionIdquerystring

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 object
    • eventTypesarray of object
    • objectsarray of object
    • eventsarray 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
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

    • workspaceIdstring

      The sandbox workspace: always "demo".

    • workflowIdstring

      Its practice workflow, Demo ADT intake.

  • 201The sandbox was made.
    Response fields

    application/json · object

    • workspaceIdstring

      The sandbox workspace: always "demo".

    • workflowIdstring

      Its 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
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

NameInTypeDescription
limitqueryinteger

How many, 1 to 20. Anything else is a 400.

Responses

  • 200The changes.
    Response fields

    application/json · object

    • itemsarray of object
      6 fields
      • idstring

        The audit event id.

      • atstring (date-time)
      • textstring

        e.g. "ADT intake v4 deployed by CJ".

      • notestring

        e.g. "live", "awaiting approval", "link never opened: likely cause of today's outage".

      • tonestring

        One of: "ok", "warn", "err", "neutral"

      • hrefstring

        The 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
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 object
      5 fields
      • idstring

        "tunnel:<id>", "trigger:<type>", "workflow:<id>" or "adapter:<id>".

      • namestring
      • hrefstring

        Its page.

      • kindstring

        One of: "tunnel", "trigger"

      • readyboolean

        False for a tunnel that is not in service.

    • workflowsarray of object
      4 fields
      • idstring

        "tunnel:<id>", "trigger:<type>", "workflow:<id>" or "adapter:<id>".

      • namestring
      • hrefstring

        Its page.

      • enabledboolean
    • destinationsarray of object
      4 fields
      • idstring

        "tunnel:<id>", "trigger:<type>", "workflow:<id>" or "adapter:<id>".

      • namestring
      • hrefstring

        Its page.

      • lanesarray of string

        Its destination queue lanes, one per adapter step.

    • linksarray of object

      Source → workflow and workflow → destination.

      2 fields
      • fromstring
      • tostring
  • 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
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).

  • errorstringrequired

    Human-readable error message.

  • codestring

    Machine-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"

  • detailsany

    Optional structured context about the error.

HealthCheck

  • statusstringrequired

    One of: "healthy", "degraded", "unhealthy"

  • checksobjectrequired
    12 fields
    • redisobjectrequired
      2 fields
      • statusstring
      • latencynumber

        Latency in ms.

    • postgresobjectrequired
      2 fields
      • statusstring
      • latencynumber
    • medplumobjectrequired
      2 fields
      • statusstring
      • latencynumber
    • mllpobjectrequired
      2 fields
      • statusstring
      • latencynumber
    • licenseobjectrequired
      2 fields
      • statusstring
      • expiresAtstring (date-time) | null
    • fhirStoreobject
      3 fields
      • kindstring

        One of: "medplum", "gcp-healthcare", "none"

      • statusstring

        up, down or timeout (Medplum, probed); configured (Cloud Healthcare, probed by /api/fhir-store); misconfigured.

      • latencyinteger

        Medplum probe, ms.

    • objectStorageobject
      2 fields
      • kindstring

        One of: "directory", "none"

      • statusstring

        The execution archive.

        One of: "ok", "off", "misconfigured"

    • workQueueobject
      4 fields
      • statusstring

        backlog once waiting work reaches capacity.

        One of: "ok", "backlog"

      • runninginteger
      • pendinginteger
      • capacityinteger
    • enginesobject

      The replica that answered.

      2 fields
      • statusstring

        One of: "up"

      • versionstring
    • agentobject
      1 field
      • statusstring

        on when AI features are on and a provider is set.

        One of: "on", "off"

    • sandboxobjectrequired

      How 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
      • statusstring

        One of: "isolated-vm", "unsafe-vm", "unavailable"

    • memoryobjectrequired
      2 fields
      • statusstring
      • usagenumber

        Heap utilisation percentage (0-100).

  • platformstring

    gcp when the engine runs on Google Cloud.

    One of: "gcp", "other"

  • versionstringrequired
  • uptimenumberrequired

    Process uptime in seconds.

  • executionQueueobject
    3 fields
    • runninginteger
    • pendinginteger
    • capacityinteger