Adapter Profiles
Adapter Profiles endpoints of the MedHook engine API: 25 operations with parameters, schemas and a curl example for each.
On this page
- List adapter profiles
- Create adapter profile
- Get adapter profile
- Update adapter profile
- Delete adapter profile
- Test adapter connection
- Generate or rotate the request signing secret
- Read a profile's fields
- Change a profile's fields
- Adapter profile cards
- Test an unsaved connection
- A profile's health
- What a profile is linked to
- A profile's limits, live
- A profile's call history
- EHR setup state
- Save scopes or the client ID
- Check what the server supports
- Test with a sandbox patient
- Rotate the engine signing key
- Engine public signing keys (JWKS)
- One environment's fields
- Add an environment
- Edit one environment
- Test one environment
- Schemas
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
| Name | In | Type | Description |
|---|---|---|---|
adapterType | query | string | Filter by adapter type. |
Responses
Example request
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
namestringrequiredadapterTypestringrequiredconfigobjectrequiredAdapter-specific configuration including credentials. Encrypted before storage.
maxConcurrentCallsinteger | nullCap on concurrent calls to this profile across all engines (non-secret, stored outside
config). A step waits up toADAPTER_SLOT_WAIT_MSfor a slot, then fails without sending. Null clears it (engine default); omitted on update leaves it unchanged.maxCallsPerSecondinteger | nullCalls 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 toADAPTER_SLOT_WAIT_MSfor 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 stringNon-blocking warnings about an accepted config, such as a SOAP profile with a plain http:// URL. Present only when there are any.
signingSecretstringGeneric 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.
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 -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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile ID. |
Responses
- 200Profile detail.
Response fields
application/json · object
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 "$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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile ID. |
Request body (required)
application/json · AdapterProfileInput
namestringrequiredadapterTypestringrequiredconfigobjectrequiredAdapter-specific configuration including credentials. Encrypted before storage.
maxConcurrentCallsinteger | nullCap on concurrent calls to this profile across all engines (non-secret, stored outside
config). A step waits up toADAPTER_SLOT_WAIT_MSfor a slot, then fails without sending. Null clears it (engine default); omitted on update leaves it unchanged.maxCallsPerSecondinteger | nullCalls 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 toADAPTER_SLOT_WAIT_MSfor 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 stringNon-blocking warnings about an accepted config, such as a SOAP profile with a plain http:// URL. Present only when there are any.
signingSecretstringGeneric 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.
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 -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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile ID. |
Responses
- 200Profile deleted.
Response fields
application/json · object
successbooleanrequireddeletedAtstring (date-time)
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 404Not found in the caller's workspace (it may exist in another workspace).
application/json · ApiError
- 409Profile is referenced by active workflows.
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile ID. |
Responses
- 200Test result (success or failure — always HTTP 200).
Response fields
application/json · object
successbooleanrequiredmessagestringrequiredpendingstringSet when the test stopped before the token request because the EHR connection has no client ID yet.
One of: "clientId"
durationMsintegerlinesarray of objectThe connection-test console lines.
2 fields
textstringrequiredtonestringOne of: "tx", "mu", "ok", "err", "warn", "accent"
warningsarray of stringNon-blocking warnings about an accepted config, such as a SOAP profile with a plain http:// URL. Present only when there are any.
metadataobjectOptional 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 -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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile ID. |
env | query | string | 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
signingSecretstringrequiredreplacedExistingbooleanrequiredenvironmentstringrequiredOne 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 -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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Responses
Example request
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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Request body (required)
application/json · object
valuesmap of string | number | boolean | array of string | number | object | nullsecretsmap of stringsecretMetamap 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 -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
| Name | In | Type | Description |
|---|---|---|---|
fields | query | string | status: the light connection-state list only. |
Responses
- 200The cards.
Response fields
application/json · object
profilesarray of object14 fields
idstringnamestringadapterTypestringtypeLabelstringtargetstringusedByarray of stringusedByWorkflowsarray of objectThe same workflows with their ids, for links to them.
3 fields
idstringnamestringenvironmentstringThe connection environment the workflow deploys against.
One of: "production", "sandbox"
statusobject2 fields
labelstringtonestring
stateobject6 fields
statestringOne of: "ok", "auth", "rate", "untested", "unreach"
labelstringHealthy, Auth failing, Rate limited, Never tested or Not answering.
tonestringOne of: "ok", "err", "warn", "neutral"
dotstringhollow only for Never tested.
One of: "solid", "hollow"
pulsebooleanAuth failing and Not answering.
detailstringNot answering only: the failure category, e.g. "TLS handshake failed".
groupstringThe page heading: FHIR servers show under APIs, Writers under Other.
One of: "EHR", "APIs", "Messaging", "Files & cloud", "Databases", "Other"
calls24hintegerlatencyarray of number | nullMean latency per UTC hour over the last 24 hours, oldest first; null where there were no calls.
lastTestedAtstring (date-time) | nullupdatedAtstring (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 "$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
adapterTypestringAn adapter type from GET /api/adapters.
configobjectThe draft's config, secrets included.
Responses
- 200The steps, with either outcome.
Response fields
application/json · object
successbooleanFalse only when a step failed.
verdictstringOne of: "passed", "passed with a note", "failed"
stepsarray of object3 fields
labelstringOne of: "Resolve host", "TLS handshake", "Authenticate", "Check permissions", "Sample call"
statusstringskip: not used by this type, or after the step that stopped the test.
One of: "ok", "warn", "fail", "skip"
notestringThe step's detail, e.g. "84 ms" or "blocked by SSRF policy".
linesarray of objectThe connection-test console.
2 fields
textstringtonestring
failurestringWhy the test failed: the host check (blocked, unreachable) or the adapter's test.
One of: "auth", "tls", "unreachable", "blocked", "timeout", "failed"
reasonstringScrubbed: no secrets, no message data.
warningsarray of stringtunnelstring | nullMLLP 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 -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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
env | query | string | 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 | nullp95 of the newest 50 logged calls in the last 24 h.
errorRate24hnumber | nullFailed over all calls in the last 24 h, 0 to 1.
topErrorCodestring | nullThe 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) | nullThe last successful call in the last 7 days.
calls24hintegerlatencyarray of number | nullMean latency per UTC hour over the last 24 hours, oldest first; null where there were no calls.
recent429booleanA 429 came back within the last hour, since the profile's limits last changed.
rate429object | null2 fields
pctnumberThe 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 | nullThe newest logged calls failing in a row (3 or more), all auth or all not answering; null when they don't.
5 fields
categorystringauth (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"
codestringThe 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.
callsintegerFailing calls in a row (3 or more).
peakPerMinuteinteger | nullCalls 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 "$ENGINE_URL/api/adapter-profiles/<id>/health" \
-H "Authorization: Bearer $TOKEN"What a profile is linked to
get/api/adapter-profiles/{id}/links
The destination queues the profile feeds (a router lane whose branch reaches a node using the profile; lanes holding messages back first) and the VPN tunnel whose remote subnets hold its host, with whether that tunnel is up (ready, and healthy when watched). For the Agent card's deep links. Names, depths, states and hrefs only, never the profile's config; a part that can't be read comes back empty. Workspace-scoped. Rate limited to 120 requests per minute.
Minimum role: viewer.
Auth: Bearer token (how to get one) · Operation: getAdapterProfileLinks
Parameters
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Responses
- 200The linked queues and tunnel.
Response fields
application/json · object
queuesarray of object5 fields
lanestringThe destination lane, dq:{workflowId}:{edgeId}.
labelstringThe destination's label.
depthintegerDeliveries waiting.
statestringOne of: "closed", "open", "half-open", "paused", "blocked"
hrefstringThe Messages destination queue view of the lane.
tunnelobject | null4 fields
idstringnamestringupbooleanReady, and healthy when the watcher has a row.
hrefstringThe tunnel on the Tunnels page.
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/adapter-profiles/<id>/links" \
-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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Responses
- 200Use against each limit.
Response fields
application/json · object
concurrentobject2 fields
inUseintegermaxinteger | nullnull: the profile sets no limit.
perSecondobject2 fields
usedintegermaxinteger | nullnull: 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 "$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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
limit | query | integer | Calls per page, 1–200 (default 50). |
cursor | query | string | The previous page's |
from | query | string (date-time) | Calls at or after this time (ISO 8601). |
to | query | string (date-time) | Calls at or before this time (ISO 8601). |
status | query | string | Comma-separated: 2xx, 3xx, 4xx, 5xx, error ( |
source | query | string |
|
workflowId | query | string | Calls made by this workflow's steps or polls. |
method | query | string | HTTP method (any case), SEND, or a step's action. |
requestId | query | string | The X-Request-Id the call carried, or the run's correlation id (the inbound request id, else the execution id). |
id | query | string | One call of this profile by its id, in either environment (a Recent polls link); the other filters are ignored. |
env | query | string | 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 object15 fields
idstringThe call's id (a workflow's Recent polls link to it).
sourcestringpoll: 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)methodstringHTTP method, SEND for MLLP / TCP, else the step's action.
pathstring | nullPath and query, identifiers masked.
statusstring | nullHTTP status or ACK code; null: no answer.
okbooleandurationMsintegererrorCodestring | nullThe HTTP status, ACK code or failure category of a failed call.
rateLimitedbooleanA 429 came back during the call.
workflowIdstring | nullThe workflow whose step or poll made the call; null for calls logged before it was kept.
requestIdstring | nullThe run's correlation id: the X-Request-Id the call carried, else the run's.
environmentstringThe connection environment the call went to.
One of: "production", "sandbox"
requestBodystring | nullWhat 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 | nullWhat 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 | nullThe next older page's cursor; null at the end.
keptHoursintegerHow 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 "$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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Responses
- 200The EHR setup state.
Response fields
application/json · object
ehrstringOne of: "Epic", "Oracle Health"
orgstring | nullThe 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, …).
jwksUrlstringThis engine's /.well-known/jwks.json.
keyobject3 fields
sourcestringengine: the engine-managed key signs; profile: the profile's own private key.
One of: "engine", "profile"
kidstring | nullmh-YYYY-MM for the engine key; the profile's key ID otherwise.
rotatesAtstring (date-time)Engine key only.
scopesarray of stringscopeOptionsarray of stringclientIdobject2 fields
setbooleanhintstring | nullShortened (a1f0…e33).
capabilitiesobject | null5 fields
checkedAtstring (date-time)fhirVersionstring | nulltransactionbooleanThe 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.
baseUrlstringThe 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 objectOne 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 | null3 fields
testedAtstring (date-time)okbooleanrowsarray of objectThe 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 | nullWhy 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.
sandboxPatientobject2 fields
idstringlabelstring
stepsarray of object3 fields
nintegertitlestringdoneboolean
stepsLeftintegerThe 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 "$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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Request body (required)
application/json · object
scopesarray of stringclientIdstringFrom the app registration; no spaces.
Responses
- 200The EHR setup state after the save.
Response fields
application/json · object
ehrstringOne of: "Epic", "Oracle Health"
orgstring | nullThe 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, …).
jwksUrlstringThis engine's /.well-known/jwks.json.
keyobject3 fields
sourcestringengine: the engine-managed key signs; profile: the profile's own private key.
One of: "engine", "profile"
kidstring | nullmh-YYYY-MM for the engine key; the profile's key ID otherwise.
rotatesAtstring (date-time)Engine key only.
scopesarray of stringscopeOptionsarray of stringclientIdobject2 fields
setbooleanhintstring | nullShortened (a1f0…e33).
capabilitiesobject | null5 fields
checkedAtstring (date-time)fhirVersionstring | nulltransactionbooleanThe 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.
baseUrlstringThe 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 objectOne 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 | null3 fields
testedAtstring (date-time)okbooleanrowsarray of objectThe 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 | nullWhy 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.
sandboxPatientobject2 fields
idstringlabelstring
stepsarray of object3 fields
nintegertitlestringdoneboolean
stepsLeftintegerThe 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 -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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Responses
- 200The comparison.
Response fields
application/json · object
checkedAtstring (date-time)fhirVersionstring | nulltransactionbooleanThe 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.
baseUrlstringThe 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 objectOne 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 -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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
Responses
- 200The test result.
Response fields
application/json · object
testedAtstring (date-time)okbooleanrowsarray of objectThe 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 -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
kidstringpreviousKidstring | nullrotatesAtstring (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 -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 object6 fields
ktystringOne of: "RSA"
nstringestringkidstringalgstringOne of: "RS384"
usestringOne 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 "$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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
envrequired | path | string | production or sandbox. |
Responses
- 200The environment's fields.
Response fields
application/json · object
profileobject9 fields
idstringnamestringadapterTypestringtypeLabelstringtargetstringThis environment's host and path.
maxConcurrentCallsinteger | nullmaxCallsPerSecondinteger | nullenvironmentstringOne of: "production", "sandbox"
environmentsarray of stringProduction first.
fieldsarray of object6 fields
keystringlabelstringvaluestringSecrets: a reference (
encrypted · adapter_profiles/<id>/sandbox/<key>for a sandbox), never plaintext.secretbooleaneditablebooleankindstring
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
envrequired | path | string | production or sandbox. |
Request body (required)
application/json · object
configobjectThe environment's config.
Responses
- 201The new environment's fields.
Response fields
application/json · object
profileobject9 fields
idstringnamestringadapterTypestringtypeLabelstringtargetstringThis environment's host and path.
maxConcurrentCallsinteger | nullmaxCallsPerSecondinteger | nullenvironmentstringOne of: "production", "sandbox"
environmentsarray of stringProduction first.
fieldsarray of object6 fields
keystringlabelstringvaluestringSecrets: a reference (
encrypted · adapter_profiles/<id>/sandbox/<key>for a sandbox), never plaintext.secretbooleaneditablebooleankindstring
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 409The request conflicts with the current state.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X POST "$ENGINE_URL/api/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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
envrequired | path | string | production or sandbox. |
Request body (required)
application/json · object
valuesobjectField values by key.
secretsobjectNew secret values by key; never echoed.
secretMetaobjectA 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
profileobject9 fields
idstringnamestringadapterTypestringtypeLabelstringtargetstringThis environment's host and path.
maxConcurrentCallsinteger | nullmaxCallsPerSecondinteger | nullenvironmentstringOne of: "production", "sandbox"
environmentsarray of stringProduction first.
fieldsarray of object6 fields
keystringlabelstringvaluestringSecrets: a reference (
encrypted · adapter_profiles/<id>/sandbox/<key>for a sandbox), never plaintext.secretbooleaneditablebooleankindstring
- 400The request is malformed or fails validation.
application/json · ApiError
- 401No credential, or the token is invalid or expired.
application/json · ApiError
- 403The caller's role, license or network address does not allow this. A signed-in person who is not a member of the requested workspace gets code `WORKSPACE_FORBIDDEN`; a viewer asking for message content gets `PHI_FORBIDDEN` (or `PHI_SEARCH_FORBIDDEN` for a search on message content).
application/json · ApiError
- 404Not found in the caller's workspace.
application/json · ApiError
- 429Rate limit exceeded (see the `Retry-After` header), or on the AI routes the daily AI budget is used up.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl -X 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
| Name | In | Type | Description |
|---|---|---|---|
idrequired | path | string | Adapter profile id. |
envrequired | path | string | production or sandbox. |
Responses
- 200The test passed, or stopped at setup (`pending: "clientId"`).
Response fields
application/json · object
successbooleanrequiredmessagestringrequiredpendingstringSet when the test stopped before the token request because the EHR connection has no client ID yet.
One of: "clientId"
reasonstringA failed test's scrubbed reason.
failurestringA failed test's category.
One of: "auth", "tls", "unreachable", "blocked", "timeout", "failed"
warningsarray of stringNon-blocking warnings about an accepted config, such as a plain http:// URL. Present only when there are any.
testedAtstring (date-time)durationMsintegerlinesarray of objectThe connection-test console lines.
2 fields
textstringrequiredtonestringOne 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 -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.
idstringnamestringrequiredadapterTypestringrequiredmaxConcurrentCallsinteger | nullCap on concurrent calls to this profile across all engines. Null:
MAX_CONCURRENT_ADAPTER_CALLSper engine process.maxCallsPerSecondinteger | nullCalls per second to this profile across all engines (token bucket, burst = rate). Null: no rate limit.
userIdstringorganizationIdstringcreatedAtstring (date-time)lastUsedAtstring (date-time)
AdapterProfileInput
namestringrequiredadapterTypestringrequiredconfigobjectrequiredAdapter-specific configuration including credentials. Encrypted before storage.
maxConcurrentCallsinteger | nullCap on concurrent calls to this profile across all engines (non-secret, stored outside
config). A step waits up toADAPTER_SLOT_WAIT_MSfor a slot, then fails without sending. Null clears it (engine default); omitted on update leaves it unchanged.maxCallsPerSecondinteger | nullCalls 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 toADAPTER_SLOT_WAIT_MSfor 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).
errorstringrequiredHuman-readable error message.
codestringMachine-readable error code.
One of: "BAD_REQUEST", "INVALID_REQUEST", "UNAUTHORIZED", "UNAUTHENTICATED", "FORBIDDEN", "NOT_FOUND", "CONFLICT", "UNPROCESSABLE_ENTITY", "RATE_LIMITED", "INTERNAL_ERROR", "SERVICE_UNAVAILABLE", "NOT_CONFIGURED", "SIGNATURE_REQUIRED", "INVALID_SIGNATURE", "TIMESTAMP_REQUIRED", "TIMESTAMP_INVALID", "TIMESTAMP_OUT_OF_TOLERANCE", "INVALID_CREDENTIALS", "INVALID_TOKEN", "PAYLOAD_TOO_LARGE", "INVALID_NDJSON", "PHI_NOT_AUTHORIZED", "PHI_IN_SANDBOX", "IN_PROGRESS", "RETRY_SCHEDULED", "WORKFLOW_DISABLED", "CONFLICTING_SCOPE", "ALREADY_DELIVERED", "CHAIN_TOO_DEEP", "NO_FAILED_DESTINATION", "STALE_SCOPE", "UNKNOWN_DESTINATION", "NO_DESTINATIONS", "NOT_A_MESSAGE", "AI_FEATURES_DISABLED"
detailsanyOptional structured context about the error.