Skip to content
Engine API

Adapter Profiles

Adapter Profiles endpoints of the MedHook engine API: 25 operations with parameters, schemas and a curl example for each.

On this page

Saved, encrypted adapter credential sets.

List adapter profiles

get/api/adapter-profiles

List all stored adapter profiles. Encrypted credential blobs are never returned.

Auth: Bearer token (how to get one) · Operation: listAdapterProfiles

Parameters

NameInTypeDescription
adapterTypequerystring

Filter by adapter type.

Responses

  • 200Profile list.
    Response fields

    application/json · object

  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles" \
  -H "Authorization: Bearer $TOKEN"

Create adapter profile

post/api/adapter-profiles

Create a new adapter profile. config is validated against the adapter's config schema, and the auth method's keys must be present (bearer needs credentials.token; webhook header auth needs authConfig.headerName and authConfig.expectedValue). A config the adapter would reject is a 400 whose details.fields names every bad field by its dotted path. Empty values are dropped and the rest is encrypted with AES-256-GCM before storage.

Auth: Bearer token (how to get one) · Operation: createAdapterProfile

Request body (required)

application/json · AdapterProfileInput

  • namestringrequired
  • adapterTypestringrequired
  • configobjectrequired

    Adapter-specific configuration including credentials. Encrypted before storage.

  • maxConcurrentCallsinteger | null

    Cap on concurrent calls to this profile across all engines (non-secret, stored outside config). A step waits up to ADAPTER_SLOT_WAIT_MS for a slot, then fails without sending. Null clears it (engine default); omitted on update leaves it unchanged.

  • maxCallsPerSecondinteger | null

    Calls per second to this profile across all engines (non-secret, stored outside config): a token bucket with a burst of one second's worth. A step waits up to ADAPTER_SLOT_WAIT_MS for a token, then fails without sending. Null clears it; omitted on update leaves it unchanged.

Responses

  • 201Profile created.
    Response fields

    application/json · object

    • warningsarray of string

      Non-blocking warnings about an accepted config, such as a SOAP profile with a plain http:// URL. Present only when there are any.

    • signingSecretstring

      Generic REST only: the whsec_ signing secret generated because signDeliveries was true and no signingSecret was sent (or stored). Returned this once; no read returns it.

    • profileAdapterProfilerequired

      Credentials are AES-256-GCM encrypted at rest and are never returned in API responses.

  • 400The profile or its `config` failed validation. `details.fields` maps each bad field's dotted config path to a message; a rule that spans fields is in `error`.

    application/json · ApiError

  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X POST "$ENGINE_URL/api/adapter-profiles" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Epic FHIR Production",
  "adapterType": "fhir-rest",
  "config": {
    "baseUrl": "https://fhir.example.test/r4",
    "authType": "bearer",
    "credentials": {
      "token": "synthetic-token"
    }
  },
  "maxConcurrentCalls": 1,
  "maxCallsPerSecond": 1
}'

Get adapter profile

get/api/adapter-profiles/{id}

Auth: Bearer token (how to get one) · Operation: getAdapterProfile

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile ID.

Responses

  • 200Profile detail.
    Response fields

    application/json · object

    • profileAdapterProfilerequired

      Credentials are AES-256-GCM encrypted at rest and are never returned in API responses.

  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 404Not found in the caller's workspace (it may exist in another workspace).

    application/json · ApiError

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles/prof_epic_fhir" \
  -H "Authorization: Bearer $TOKEN"

Update adapter profile

put/api/adapter-profiles/{id}

Rename or replace a profile. Omit config or send "[encrypted]" to keep the stored one. A replacement config is validated like create: a config the adapter would reject is a 400 with details.fields, and the stored row is unchanged.

Auth: Bearer token (how to get one) · Operation: updateAdapterProfile

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile ID.

Request body (required)

application/json · AdapterProfileInput

  • namestringrequired
  • adapterTypestringrequired
  • configobjectrequired

    Adapter-specific configuration including credentials. Encrypted before storage.

  • maxConcurrentCallsinteger | null

    Cap on concurrent calls to this profile across all engines (non-secret, stored outside config). A step waits up to ADAPTER_SLOT_WAIT_MS for a slot, then fails without sending. Null clears it (engine default); omitted on update leaves it unchanged.

  • maxCallsPerSecondinteger | null

    Calls per second to this profile across all engines (non-secret, stored outside config): a token bucket with a burst of one second's worth. A step waits up to ADAPTER_SLOT_WAIT_MS for a token, then fails without sending. Null clears it; omitted on update leaves it unchanged.

Responses

  • 200Profile updated.
    Response fields

    application/json · object

    • warningsarray of string

      Non-blocking warnings about an accepted config, such as a SOAP profile with a plain http:// URL. Present only when there are any.

    • signingSecretstring

      Generic REST only: the whsec_ signing secret generated because signDeliveries was true and no signingSecret was sent (or stored). Returned this once; no read returns it.

    • profileAdapterProfilerequired

      Credentials are AES-256-GCM encrypted at rest and are never returned in API responses.

  • 400The profile or its `config` failed validation. `details.fields` maps each bad field's dotted config path to a message; a rule that spans fields is in `error`.

    application/json · ApiError

  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 404Not found in the caller's workspace (it may exist in another workspace).

    application/json · ApiError

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X PUT "$ENGINE_URL/api/adapter-profiles/prof_epic_fhir" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Epic FHIR Production",
  "adapterType": "fhir-rest",
  "config": {
    "baseUrl": "https://fhir.example.test/r4",
    "authType": "bearer",
    "credentials": {
      "token": "synthetic-token"
    }
  },
  "maxConcurrentCalls": 1,
  "maxCallsPerSecond": 1
}'

Delete adapter profile

delete/api/adapter-profiles/{id}

Auth: Bearer token (how to get one) · Operation: deleteAdapterProfile

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile ID.

Responses

  • 200Profile deleted.
    Response fields

    application/json · object

    • successbooleanrequired
    • deletedAtstring (date-time)
  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 404Not found in the caller's workspace (it may exist in another workspace).

    application/json · ApiError

  • 409Profile is referenced by active workflows.

    application/json · ApiError

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X DELETE "$ENGINE_URL/api/adapter-profiles/prof_epic_fhir" \
  -H "Authorization: Bearer $TOKEN"

Test adapter connection

post/api/adapter-profiles/{id}/test

Validates adapter credentials by performing a live connection test. Answers the console lines (what was sent, what came back, one plain-words line; on an auth failure the OAuth error code is the only server text shown) and durationMs; a failed test answers 400. An Epic or Oracle Health connection with no client ID yet only reads the public CapabilityStatement and names the signing kid: it answers 200 with success: false and pending: "clientId", does not change the card state, and is audited as adapter_profile.setup_checked. Rate limited: 10 req / 60 s.

Auth: Bearer token (how to get one) · Operation: testAdapterProfile

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile ID.

Responses

  • 200Test result (success or failure — always HTTP 200).
    Response fields

    application/json · object

    • successbooleanrequired
    • messagestringrequired
    • pendingstring

      Set when the test stopped before the token request because the EHR connection has no client ID yet.

      One of: "clientId"

    • durationMsinteger
    • linesarray of object

      The connection-test console lines.

      2 fields
      • textstringrequired
      • tonestring

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

    • warningsarray of string

      Non-blocking warnings about an accepted config, such as a SOAP profile with a plain http:// URL. Present only when there are any.

    • metadataobject

      Optional diagnostic data (e.g., server version, response time).

  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 404Not found in the caller's workspace (it may exist in another workspace).

    application/json · ApiError

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X POST "$ENGINE_URL/api/adapter-profiles/prof_epic_fhir/test" \
  -H "Authorization: Bearer $TOKEN"

Generate or rotate the request signing secret

post/api/adapter-profiles/{id}/signing-secret

Generates a new Standard Webhooks signing secret (whsec_...) for a Generic REST profile, turns signing on and returns the secret once. Each request the profile sends then carries webhook-id, webhook-timestamp and webhook-signature. A previous secret stops working at once. The secret is stored encrypted in the profile and no read returns it.

Auth: Bearer token (how to get one) · Operation: rotateAdapterProfileSigningSecret

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile ID.

envquerystring

The connection environment whose secret is rotated: production or sandbox. Default: the connection's first environment. The other environment's config is not changed.

Responses

  • 200The new secret, shown this once.
    Response fields

    application/json · object

    • signingSecretstringrequired
    • replacedExistingbooleanrequired
    • environmentstringrequired

      One of: "production", "sandbox"

  • 400The profile's adapter type does not sign requests, or env is not production or sandbox.
  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 404No such profile in this workspace, or the connection has no such environment.
  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X POST "$ENGINE_URL/api/adapter-profiles/prof_epic_fhir/signing-secret" \
  -H "Authorization: Bearer $TOKEN"

Read a profile's fields

get/api/adapter-profiles/{id}/fields

The fields of the adapter's config schema for the detail panel. Secrets come back as references, never as plaintext. secretMeta has, per secret field, when it was set (setAt) or last rotated (rotatedAt), when it expires (expiresAt) or is due (nextRotation), and a private key's algorithm (alg): never a value.

Minimum role: viewer.

Auth: Bearer token (how to get one) · Operation: getAdapterProfileFields

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

Responses

  • 200The fields.

    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

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles/<id>/fields" \
  -H "Authorization: Bearer $TOKEN"

Change a profile's fields

patch/api/adapter-profiles/{id}/fields

values sets plain settings: text, numbers and true/false, a list as an array (scopes), and an object as an object or JSON text (x12 defaultDelimiters). secrets replaces secret fields, including auth objects (credentials, a webhook's authConfig) as JSON: they are encrypted, audited and never echoed; each replaced field's secretMeta.setAt (and rotatedAt when it had a value) is recorded, its old expiresAt and nextRotation are dropped unless this PATCH dates the new value, and the next passing connection test resumes the destination queues this connection feeds that are paused or waiting on a retry (audited as destination.queue.resumed with reason "credentials replaced"). secretMeta sets a secret field's expiresAt or nextRotation (ISO date-times; null clears one); a date expiring within 14 days is listed in Needs you. Send at least one. A bad value is a 400 with details.fields keyed by field name.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: updateAdapterProfileFields

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

Request body (required)

application/json · object

  • valuesmap of string | number | boolean | array of string | number | object | null
  • secretsmap of string
  • secretMetamap of object

Responses

  • 200Updated.

    application/json · object

  • 400The request is malformed or fails validation.

    application/json · ApiError

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X PATCH "$ENGINE_URL/api/adapter-profiles/<id>/fields" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "values": {},
  "secrets": {},
  "secretMeta": {}
}'

Adapter profile cards

get/api/adapter-profiles/overview

One card per profile in the workspace: name, type, a target with no credentials, the workflows that use it, a status from the latest audited connection test, and for the Adapters page the five-state state (3 or more live calls failing in a row newer than the latest test, else a failing test that no working call has outlived, then a 429 within the hour since the last limit change), the page group, calls in 24 h and 24 hourly latency points from the call log. When the call log can't be read the cards still come back, with the health of a profile with no calls (calls24h 0, null latency points), so the cards load either way. With fields=status (the Templates gallery's readiness read) each item is only id, name, adapterType and state as its id string (from the latest test alone), read without decrypting any config, loading workflows or reading the call log. Rate limited to 120 requests per minute.

Minimum role: viewer.

Auth: Bearer token (how to get one) · Operation: getAdapterProfileOverview

Parameters

NameInTypeDescription
fieldsquerystring

status: the light connection-state list only.

Responses

  • 200The cards.
    Response fields

    application/json · object

    • profilesarray of object
      14 fields
      • idstring
      • namestring
      • adapterTypestring
      • typeLabelstring
      • targetstring
      • usedByarray of string
      • usedByWorkflowsarray of object

        The same workflows with their ids, for links to them.

        3 fields
        • idstring
        • namestring
        • environmentstring

          The connection environment the workflow deploys against.

          One of: "production", "sandbox"

      • statusobject
        2 fields
        • labelstring
        • tonestring
      • stateobject
        6 fields
        • statestring

          One of: "ok", "auth", "rate", "untested", "unreach"

        • labelstring

          Healthy, Auth failing, Rate limited, Never tested or Not answering.

        • tonestring

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

        • dotstring

          hollow only for Never tested.

          One of: "solid", "hollow"

        • pulseboolean

          Auth failing and Not answering.

        • detailstring

          Not answering only: the failure category, e.g. "TLS handshake failed".

      • groupstring

        The page heading: FHIR servers show under APIs, Writers under Other.

        One of: "EHR", "APIs", "Messaging", "Files & cloud", "Databases", "Other"

      • calls24hinteger
      • latencyarray of number | null

        Mean latency per UTC hour over the last 24 hours, oldest first; null where there were no calls.

      • lastTestedAtstring (date-time) | null
      • updatedAtstring (date-time)
    • totalinteger
  • 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/adapter-profiles/overview" \
  -H "Authorization: Bearer $TOKEN"

Test an unsaved connection

post/api/adapter-profiles/test-draft

Tests a connection before it is saved (New connection, Test before saving). The config is checked against the adapter's schema (400 with the bad fields), then five steps run: Resolve host (DNS under the adapter's own host rule, the one its saved test applies: the SSRF rules for HTTP and most socket adapters, the cloud metadata server only for MLLP and SFTP; a refused address stops here as blocked, a name that doesn't resolve as unreachable), TLS handshake, Authenticate, Check permissions and Sample call, from the adapter's own connection test. A host that never answers on a plain connection fails at Authenticate. An Epic or Oracle Health draft with no client ID only reads the server's public CapabilityStatement, with the draft's connection options, and stops at Authenticate with "needs a client ID · finish in EHR setup" (verdict "passed with a note"); an answer other than 2xx or 401 fails Sample call with the status. Nothing is stored. The config never comes back and the reason is scrubbed of the draft's secrets. Audited as adapter_profile.draft_tested with the type and outcome only. Rate limited to 10 requests per minute.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: testAdapterProfileDraft

Request body (required)

application/json · object

  • adapterTypestring

    An adapter type from GET /api/adapters.

  • configobject

    The draft's config, secrets included.

Responses

  • 200The steps, with either outcome.
    Response fields

    application/json · object

    • successboolean

      False only when a step failed.

    • verdictstring

      One of: "passed", "passed with a note", "failed"

    • stepsarray of object
      3 fields
      • labelstring

        One of: "Resolve host", "TLS handshake", "Authenticate", "Check permissions", "Sample call"

      • statusstring

        skip: not used by this type, or after the step that stopped the test.

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

      • notestring

        The step's detail, e.g. "84 ms" or "blocked by SSRF policy".

    • linesarray of object

      The connection-test console.

      2 fields
      • textstring
      • tonestring
    • failurestring

      Why the test failed: the host check (blocked, unreachable) or the adapter's test.

      One of: "auth", "tls", "unreachable", "blocked", "timeout", "failed"

    • reasonstring

      Scrubbed: no secrets, no message data.

    • warningsarray of string
    • tunnelstring | null

      MLLP and DICOM only: the tunnel the host sits behind, null for none.

    • testedAtstring (date-time)
  • 400The request is malformed or fails validation.

    application/json · ApiError

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).

    application/json · ApiError

  • 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/adapter-profiles/test-draft" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "adapterType": "string",
  "config": {}
}'

A profile's health

get/api/adapter-profiles/{id}/health

p95 latency and the top error code over the last 50 logged calls (within 24 h), error rate and calls over 24 h, the last success and 24 hourly latency points, from the profile's call log (its newest 50 calls, metadata only, and its calls per hour, kept 7 days). Counts, times and codes only: no paths or bodies. Workspace-scoped. Rate limited to 120 requests per minute.

Minimum role: viewer.

Auth: Bearer token (how to get one) · Operation: getAdapterProfileHealth

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

envquerystring

The connection environment whose calls are read: production or sandbox. Default: the connection's first environment.

Responses

  • 200The health figures.
    Response fields

    application/json · object

    • p95Msinteger | null

      p95 of the newest 50 logged calls in the last 24 h.

    • errorRate24hnumber | null

      Failed over all calls in the last 24 h, 0 to 1.

    • topErrorCodestring | null

      The most frequent error code among the newest 50 logged calls that failed in the last 24 h: an HTTP status, an ACK code or a failure category (auth, tls, unreachable, blocked, timeout, failed).

    • lastSuccessAtstring (date-time) | null

      The last successful call in the last 7 days.

    • calls24hinteger
    • latencyarray of number | null

      Mean latency per UTC hour over the last 24 hours, oldest first; null where there were no calls.

    • recent429boolean

      A 429 came back within the last hour, since the profile's limits last changed.

    • rate429object | null
      2 fields
      • pctnumber

        The share of the logged calls in the last hour (the newest 50 or fewer) that got a 429, percent.

      • sincestring (date-time)

        The oldest of those 429s.

    • liveFailureobject | null

      The newest logged calls failing in a row (3 or more), all auth or all not answering; null when they don't.

      5 fields
      • categorystring

        auth (401/403/407, or a call refused with no status, e.g. a token exchange), or the Not answering cause.

        One of: "auth", "tls", "unreachable", "blocked", "timeout"

      • codestring

        The newest failing call's error code, e.g. "401", "auth" (no status) or "timeout".

      • sincestring (date-time)

        The oldest failing call of the run.

      • atstring (date-time)

        The newest failing call.

      • callsinteger

        Failing calls in a row (3 or more).

    • peakPerMinuteinteger | null

      Calls per minute in the busiest UTC hour of the last 24 h, rounded up; null: no calls.

  • 400The request is malformed or fails validation.

    application/json · ApiError

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles/<id>/health" \
  -H "Authorization: Bearer $TOKEN"

A profile's limits, live

get/api/adapter-profiles/{id}/limits

Concurrent calls in flight (the unexpired cluster slots of a profile with maxConcurrentCalls, else this engine's calls) and calls in the last second (from the token bucket of a profile with maxCallsPerSecond, else the logged calls). Workspace-scoped. Rate limited to 240 requests per minute.

Minimum role: viewer.

Auth: Bearer token (how to get one) · Operation: getAdapterProfileLimits

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

Responses

  • 200Use against each limit.
    Response fields

    application/json · object

    • concurrentobject
      2 fields
      • inUseinteger
      • maxinteger | null

        null: the profile sets no limit.

    • perSecondobject
      2 fields
      • usedinteger
      • maxinteger | null

        null: the profile sets no limit.

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles/<id>/limits" \
  -H "Authorization: Bearer $TOKEN"

A profile's call history

get/api/adapter-profiles/{id}/calls

The profile's calls from its call log, newest first, a page at a time: workflow steps' calls and polling triggers' reads (source). Method, path, status, time, error code, the workflow and request id, and the request and response masked at write. The log keeps calls for CALL_LOG_RETENTION_HOURS (default 168, 7 days; keptHours), at most CALL_LOG_MAX_ROWS (default 50,000) per connection and environment. Pass nextCursor back as cursor for the next older page. Identifiers in the path are masked when the call is logged and again on read (identifier=MR|48••••). Workspace-scoped. Rate limited to 120 requests per minute.

Minimum role: viewer.

Auth: Bearer token (how to get one) · Operation: getAdapterProfileCalls

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

limitqueryinteger

Calls per page, 1–200 (default 50).

cursorquerystring

The previous page's nextCursor: calls older than its last row.

fromquerystring (date-time)

Calls at or after this time (ISO 8601).

toquerystring (date-time)

Calls at or before this time (ISO 8601).

statusquerystring

Comma-separated: 2xx, 3xx, 4xx, 5xx, error (error: every failed call), or an exact status or error code (503, AE, timeout). A call matching any is returned.

sourcequerystring

poll: polling triggers' reads; step: workflow steps' calls.

workflowIdquerystring

Calls made by this workflow's steps or polls.

methodquerystring

HTTP method (any case), SEND, or a step's action.

requestIdquerystring

The X-Request-Id the call carried, or the run's correlation id (the inbound request id, else the execution id).

idquerystring

One call of this profile by its id, in either environment (a Recent polls link); the other filters are ignored.

envquerystring

The connection environment whose calls are read: production or sandbox. Default: the connection's first environment.

Responses

  • 200The calls.
    Response fields

    application/json · object

    • callsarray of object
      15 fields
      • idstring

        The call's id (a workflow's Recent polls link to it).

      • sourcestring

        poll: a polling trigger's read of its source (one row per poll, the first page's exchange or the failing page's); step: a workflow step's call.

        One of: "step", "poll"

      • atstring (date-time)
      • methodstring

        HTTP method, SEND for MLLP / TCP, else the step's action.

      • pathstring | null

        Path and query, identifiers masked.

      • statusstring | null

        HTTP status or ACK code; null: no answer.

      • okboolean
      • durationMsinteger
      • errorCodestring | null

        The HTTP status, ACK code or failure category of a failed call.

      • rateLimitedboolean

        A 429 came back during the call.

      • workflowIdstring | null

        The workflow whose step or poll made the call; null for calls logged before it was kept.

      • requestIdstring | null

        The run's correlation id: the X-Request-Id the call carried, else the run's.

      • environmentstring

        The connection environment the call went to.

        One of: "production", "sandbox"

      • requestBodystring | null

        What follows the request line, masked at write (G-adapters-7): Authorization as '{scheme} ••••', other credential headers '••••', X-Request-Id, a blank line, the body with every JSON leaf (but structural keys) or HL7v2 field after MSH masked to its first character. At most 2 KB; null when none was kept or the call is older than 7 days.

      • responseBodystring | null

        What follows the status line, masked the same way: Retry-After, Location (path masked), the body, or the OAuth error code of a 4xx. Null when none was kept or the call is older than 7 days.

    • nextCursorstring | null

      The next older page's cursor; null at the end.

    • keptHoursinteger

      How many hours of calls the log keeps.

  • 400The request is malformed or fails validation.

    application/json · ApiError

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles/<id>/calls" \
  -H "Authorization: Bearer $TOKEN"

EHR setup state

get/api/adapter-profiles/{id}/ehr-setup

For an Epic or Oracle Health connection: the JWKS URL and kid to register, the chosen scopes, the client ID shortened, the last CapabilityStatement check and sandbox test, and the six steps with how many are left. No secrets. Workspace-scoped; 404 for other types. Rate limited to 60 requests per minute.

Minimum role: viewer.

Auth: Bearer token (how to get one) · Operation: getAdapterProfileEhrSetup

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

Responses

  • 200The EHR setup state.
    Response fields

    application/json · object

    • ehrstring

      One of: "Epic", "Oracle Health"

    • orgstring | null

      The workspace's healthcare organization (its name, the seeded default workspace included once renamed), for step 1's copy; null for a workspace named after an environment (Default, Production, …).

    • jwksUrlstring

      This engine's /.well-known/jwks.json.

    • keyobject
      3 fields
      • sourcestring

        engine: the engine-managed key signs; profile: the profile's own private key.

        One of: "engine", "profile"

      • kidstring | null

        mh-YYYY-MM for the engine key; the profile's key ID otherwise.

      • rotatesAtstring (date-time)

        Engine key only.

    • scopesarray of string
    • scopeOptionsarray of string
    • clientIdobject
      2 fields
      • setboolean
      • hintstring | null

        Shortened (a1f0…e33).

    • capabilitiesobject | null
      5 fields
      • checkedAtstring (date-time)
      • fhirVersionstring | null
      • transactionboolean

        The server takes a transaction Bundle. When false, Epic and Oracle Health send a Bundle's resources one at a time, in order. Absent on checks stored before it.

      • baseUrlstring

        The FHIR base the check read. A run against another base (the connection's other environment) sends one resource at a time. Absent on checks stored before it.

      • rowsarray of object

        One per resource type the steps use (at most 15, then a ! row with how many more were not checked), then transaction Bundles.

        2 fields
        • markstring

          ✓ supported or passed, ! partly, ✕ not.

          One of: "✓", "!", "✕"

        • textstring
    • sandboxTestobject | null
      3 fields
      • testedAtstring (date-time)
      • okboolean
      • rowsarray of object

        The token request, then the sandbox patient read: HTTP status only, the patient named from the engine's table, nothing from the answer.

        2 fields
        • markstring

          ✓ supported or passed, ! partly, ✕ not.

          One of: "✓", "!", "✕"

        • textstring
    • sandboxRefusalstring | null

      Why the sandbox test can't run, known before anything is sent: the FHIR base URL or token URL is not the vendor's sandbox in any of the connection's environments, or the Sandbox environment has no client ID. The UI shows a disabled Run test with this reason; POST …/sandbox-test still answers 409. Null when it can run.

    • sandboxPatientobject
      2 fields
      • idstring
      • labelstring
    • stepsarray of object
      3 fields
      • ninteger
      • titlestring
      • doneboolean
    • stepsLeftinteger

      The EHR setup tab's badge.

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles/<id>/ehr-setup" \
  -H "Authorization: Bearer $TOKEN"

Save scopes or the client ID

put/api/adapter-profiles/{id}/ehr-setup

Saves the scope chips and/or the client ID into the connection's config, where the token request reads them. A new client ID clears the last sandbox test. Audited as adapter_profile.ehr_setup_updated with the scopes and whether the client ID changed, never its value. Rate limited to 20 requests per minute.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: updateAdapterProfileEhrSetup

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

Request body (required)

application/json · object

  • scopesarray of string
  • clientIdstring

    From the app registration; no spaces.

Responses

  • 200The EHR setup state after the save.
    Response fields

    application/json · object

    • ehrstring

      One of: "Epic", "Oracle Health"

    • orgstring | null

      The workspace's healthcare organization (its name, the seeded default workspace included once renamed), for step 1's copy; null for a workspace named after an environment (Default, Production, …).

    • jwksUrlstring

      This engine's /.well-known/jwks.json.

    • keyobject
      3 fields
      • sourcestring

        engine: the engine-managed key signs; profile: the profile's own private key.

        One of: "engine", "profile"

      • kidstring | null

        mh-YYYY-MM for the engine key; the profile's key ID otherwise.

      • rotatesAtstring (date-time)

        Engine key only.

    • scopesarray of string
    • scopeOptionsarray of string
    • clientIdobject
      2 fields
      • setboolean
      • hintstring | null

        Shortened (a1f0…e33).

    • capabilitiesobject | null
      5 fields
      • checkedAtstring (date-time)
      • fhirVersionstring | null
      • transactionboolean

        The server takes a transaction Bundle. When false, Epic and Oracle Health send a Bundle's resources one at a time, in order. Absent on checks stored before it.

      • baseUrlstring

        The FHIR base the check read. A run against another base (the connection's other environment) sends one resource at a time. Absent on checks stored before it.

      • rowsarray of object

        One per resource type the steps use (at most 15, then a ! row with how many more were not checked), then transaction Bundles.

        2 fields
        • markstring

          ✓ supported or passed, ! partly, ✕ not.

          One of: "✓", "!", "✕"

        • textstring
    • sandboxTestobject | null
      3 fields
      • testedAtstring (date-time)
      • okboolean
      • rowsarray of object

        The token request, then the sandbox patient read: HTTP status only, the patient named from the engine's table, nothing from the answer.

        2 fields
        • markstring

          ✓ supported or passed, ! partly, ✕ not.

          One of: "✓", "!", "✕"

        • textstring
    • sandboxRefusalstring | null

      Why the sandbox test can't run, known before anything is sent: the FHIR base URL or token URL is not the vendor's sandbox in any of the connection's environments, or the Sandbox environment has no client ID. The UI shows a disabled Run test with this reason; POST …/sandbox-test still answers 409. Null when it can run.

    • sandboxPatientobject
      2 fields
      • idstring
      • labelstring
    • stepsarray of object
      3 fields
      • ninteger
      • titlestring
      • doneboolean
    • stepsLeftinteger

      The EHR setup tab's badge.

  • 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
curl -X PUT "$ENGINE_URL/api/adapter-profiles/<id>/ehr-setup" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "scopes": [
    "system/Patient.read"
  ],
  "clientId": "string"
}'

Check what the server supports

post/api/adapter-profiles/{id}/capabilities

Reads the server's public CapabilityStatement (GET {fhirBaseUrl}/metadata, no token, SSRF-checked) and compares it with what the workspace's steps that deliver to this profile use (with none yet: Patient read, search and create; Encounter create and update; Observation create), plus transaction Bundles. The rows and the transaction flag are stored on the profile (resource types and interactions only, no PHI); without a transaction, Epic and Oracle Health send resources one at a time, in order. Audited as adapter_profile.capabilities_checked. 502 when the answer is not a CapabilityStatement. Rate limited to 10 requests per minute.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: checkAdapterProfileCapabilities

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

Responses

  • 200The comparison.
    Response fields

    application/json · object

    • checkedAtstring (date-time)
    • fhirVersionstring | null
    • transactionboolean

      The server takes a transaction Bundle. When false, Epic and Oracle Health send a Bundle's resources one at a time, in order. Absent on checks stored before it.

    • baseUrlstring

      The FHIR base the check read. A run against another base (the connection's other environment) sends one resource at a time. Absent on checks stored before it.

    • rowsarray of object

      One per resource type the steps use (at most 15, then a ! row with how many more were not checked), then transaction Bundles.

      2 fields
      • markstring

        ✓ supported or passed, ! partly, ✕ not.

        One of: "✓", "!", "✕"

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

  • 502Error.

    application/json · ApiError

Example request

curl
curl -X POST "$ENGINE_URL/api/adapter-profiles/<id>/capabilities" \
  -H "Authorization: Bearer $TOKEN"

Test with a sandbox patient

post/api/adapter-profiles/{id}/sandbox-test

Signs a token request and reads the vendor's public sandbox patient (Epic erXuFYUfucBZaryVksYEcMg3, Oracle Health 12724066). Answers 200 with either outcome; nothing from the patient read is returned. Runs against the connection's Sandbox environment: a production connection with a paired sandbox is tested through the paired config (its base URL and client ID). 409 Needs a client ID when none is set, and 409 when the FHIR base URL is not the vendor's sandbox (Epic fhir.epic.com; Oracle Health fhir-ehr-code.cerner.com or fhir-open.cerner.com) or the token URL is not the vendor's sandbox token server (Epic fhir.epic.com; Oracle Health authorization.cerner.com), plus hosts in EHR_SANDBOX_HOSTS (ignored in production unless EHR_SANDBOX_HOSTS_IN_PRODUCTION=true). Refused with nothing sent: no patient data is read from a production server and no client assertion goes to one. Audited as adapter_profile.tested (check: sandbox), so the connection's status follows it. Rate limited to 10 requests per minute.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: sandboxTestAdapterProfile

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

Responses

  • 200The test result.
    Response fields

    application/json · object

    • testedAtstring (date-time)
    • okboolean
    • rowsarray of object

      The token request, then the sandbox patient read: HTTP status only, the patient named from the engine's table, nothing from the answer.

      2 fields
      • markstring

        ✓ supported or passed, ! partly, ✕ not.

        One of: "✓", "!", "✕"

      • textstring
  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 409The request conflicts with the current state.

    application/json · ApiError

  • 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X POST "$ENGINE_URL/api/adapter-profiles/<id>/sandbox-test" \
  -H "Authorization: Bearer $TOKEN"

Rotate the engine signing key

post/api/signing-key/rotate

Replaces the engine-managed key that signs Epic and Oracle Health client assertions. The new key signs from now on; the old one stays in /.well-known/jwks.json for 30 days. Keys also rotate on their own 90 days after they are made. Audited as engine.signing_key_rotated with the two kids. Rate limited to 5 requests per minute.

Minimum role: admin.

Auth: Bearer token (how to get one) · Operation: rotateEngineSigningKey

Responses

  • 200The new key.
    Response fields

    application/json · object

    • kidstring
    • previousKidstring | null
    • rotatesAtstring (date-time)
  • 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/signing-key/rotate" \
  -H "Authorization: Bearer $TOKEN"

Engine public signing keys (JWKS)

get/.well-known/jwks.json

The public keys EHRs verify MedHook's client assertions with: the active key and keys replaced in the last 30 days. Public keys only (kty, n, e, kid, alg, use). No credential needed. Cacheable for five minutes, never indexed. Rate limited to 60 requests per minute.

Auth: None, public route · Operation: getEngineJwks

Responses

  • 200The key set.
    Response fields

    application/json · object

    • keysarray of object
      6 fields
      • ktystring

        One of: "RSA"

      • nstring
      • estring
      • kidstring
      • algstring

        One of: "RS384"

      • usestring

        One of: "sig"

  • 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/.well-known/jwks.json"

One environment's fields

get/api/adapter-profiles/{id}/environments/{env}

The fields of one environment of a connection (Production | Sandbox), as GET /api/adapter-profiles/{id}/fields. Each environment has its own URL and write-only secrets. 404 when the connection has no such environment. Rate limited to 60 requests per minute.

Minimum role: viewer.

Auth: Bearer token (how to get one) · Operation: getAdapterProfileEnvironment

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

envrequiredpathstring

production or sandbox.

Responses

  • 200The environment's fields.
    Response fields

    application/json · object

    • profileobject
      9 fields
      • idstring
      • namestring
      • adapterTypestring
      • typeLabelstring
      • targetstring

        This environment's host and path.

      • maxConcurrentCallsinteger | null
      • maxCallsPerSecondinteger | null
      • environmentstring

        One of: "production", "sandbox"

      • environmentsarray of string

        Production first.

    • fieldsarray of object
      6 fields
      • keystring
      • labelstring
      • valuestring

        Secrets: a reference (encrypted · adapter_profiles/<id>/sandbox/<key> for a sandbox), never plaintext.

      • secretboolean
      • editableboolean
      • kindstring
  • 400The request is malformed or fails validation.

    application/json · ApiError

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapter-profiles/<id>/environments/production" \
  -H "Authorization: Bearer $TOKEN"

Add an environment

post/api/adapter-profiles/{id}/environments/{env}

Adds the environment a connection doesn't have yet (New connection with ?addTo=). The config is checked by the adapter schema and sealed on its own. A signing secret generated for it comes back once as signingSecret. Audited as adapter_profile.environment_added, with no values. 409 when the environment exists. Rate limited to 20 requests per minute.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: addAdapterProfileEnvironment

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

envrequiredpathstring

production or sandbox.

Request body (required)

application/json · object

  • configobject

    The environment's config.

Responses

  • 201The new environment's fields.
    Response fields

    application/json · object

    • profileobject
      9 fields
      • idstring
      • namestring
      • adapterTypestring
      • typeLabelstring
      • targetstring

        This environment's host and path.

      • maxConcurrentCallsinteger | null
      • maxCallsPerSecondinteger | null
      • environmentstring

        One of: "production", "sandbox"

      • environmentsarray of string

        Production first.

    • fieldsarray of object
      6 fields
      • keystring
      • labelstring
      • valuestring

        Secrets: a reference (encrypted · adapter_profiles/<id>/sandbox/<key> for a sandbox), never plaintext.

      • secretboolean
      • editableboolean
      • kindstring
  • 400The request is malformed or fails validation.

    application/json · ApiError

  • 401No credential, or the token is invalid or expired.

    application/json · ApiError

  • 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).

    application/json · ApiError

  • 404Not found in the caller's workspace.

    application/json · ApiError

  • 409The request conflicts with the current state.

    application/json · ApiError

  • 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl -X POST "$ENGINE_URL/api/adapter-profiles/<id>/environments/production" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "config": {}
}'

Edit one environment

patch/api/adapter-profiles/{id}/environments/{env}

Saves non-secret values and write-only secret replacements into that environment's config only, checked by the adapter schema. Audited as adapter_profile.updated (masked before/after) and adapter_profile.secret_rotated (field names), each with the environment. Rate limited to 20 requests per minute.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: updateAdapterProfileEnvironment

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

envrequiredpathstring

production or sandbox.

Request body (required)

application/json · object

  • valuesobject

    Field values by key.

  • secretsobject

    New secret values by key; never echoed.

  • secretMetaobject

    A secret field's expiresAt or nextRotation (ISO date-time; null clears), by key.

Responses

  • 200The environment's fields after the save.
    Response fields

    application/json · object

    • profileobject
      9 fields
      • idstring
      • namestring
      • adapterTypestring
      • typeLabelstring
      • targetstring

        This environment's host and path.

      • maxConcurrentCallsinteger | null
      • maxCallsPerSecondinteger | null
      • environmentstring

        One of: "production", "sandbox"

      • environmentsarray of string

        Production first.

    • fieldsarray of object
      6 fields
      • keystring
      • labelstring
      • valuestring

        Secrets: a reference (encrypted · adapter_profiles/<id>/sandbox/<key> for a sandbox), never plaintext.

      • secretboolean
      • editableboolean
      • kindstring
  • 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
curl -X PATCH "$ENGINE_URL/api/adapter-profiles/<id>/environments/production" \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "values": {},
  "secrets": {},
  "secretMeta": {}
}'

Test one environment

post/api/adapter-profiles/{id}/environments/{env}/test

A connection test of that environment's URL and credentials, answered as POST /api/adapter-profiles/{id}/test: the console lines and durationMs. The connection's first environment is audited as adapter_profile.tested (its card status follows it), the other as adapter_profile.environment_tested. A failed test answers 400 with the same body (success: false, reason, failure, lines). An Epic or Oracle Health environment with no client ID yet only reads the public CapabilityStatement and names the signing kid: it answers 200 with success: false and pending: "clientId", does not change the card state, and is audited as adapter_profile.setup_checked. Rate limited to 10 requests per minute.

Minimum role: operator.

Auth: Bearer token (how to get one) · Operation: testAdapterProfileEnvironment

Parameters

NameInTypeDescription
idrequiredpathstring

Adapter profile id.

envrequiredpathstring

production or sandbox.

Responses

  • 200The test passed, or stopped at setup (`pending: "clientId"`).
    Response fields

    application/json · object

    • successbooleanrequired
    • messagestringrequired
    • pendingstring

      Set when the test stopped before the token request because the EHR connection has no client ID yet.

      One of: "clientId"

    • reasonstring

      A failed test's scrubbed reason.

    • failurestring

      A failed test's category.

      One of: "auth", "tls", "unreachable", "blocked", "timeout", "failed"

    • warningsarray of string

      Non-blocking warnings about an accepted config, such as a plain http:// URL. Present only when there are any.

    • testedAtstring (date-time)
    • durationMsinteger
    • linesarray of object

      The connection-test console lines.

      2 fields
      • textstringrequired
      • tonestring

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

  • 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
curl -X POST "$ENGINE_URL/api/adapter-profiles/<id>/environments/production/test" \
  -H "Authorization: Bearer $TOKEN"

Schemas

Named objects the operations above link to.

AdapterProfile

Credentials are AES-256-GCM encrypted at rest and are never returned in API responses.

  • idstring
  • namestringrequired
  • adapterTypestringrequired
  • maxConcurrentCallsinteger | null

    Cap on concurrent calls to this profile across all engines. Null: MAX_CONCURRENT_ADAPTER_CALLS per engine process.

  • maxCallsPerSecondinteger | null

    Calls per second to this profile across all engines (token bucket, burst = rate). Null: no rate limit.

  • userIdstring
  • organizationIdstring
  • createdAtstring (date-time)
  • lastUsedAtstring (date-time)

AdapterProfileInput

  • namestringrequired
  • adapterTypestringrequired
  • configobjectrequired

    Adapter-specific configuration including credentials. Encrypted before storage.

  • maxConcurrentCallsinteger | null

    Cap on concurrent calls to this profile across all engines (non-secret, stored outside config). A step waits up to ADAPTER_SLOT_WAIT_MS for a slot, then fails without sending. Null clears it (engine default); omitted on update leaves it unchanged.

  • maxCallsPerSecondinteger | null

    Calls per second to this profile across all engines (non-secret, stored outside config): a token bucket with a burst of one second's worth. A step waits up to ADAPTER_SLOT_WAIT_MS for a token, then fails without sending. Null clears it; omitted on update leaves it unchanged.

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.