Adapters
Adapters endpoints of the MedHook engine API: 3 operations with parameters, schemas and a curl example for each.
Adapter type catalog (read-only).
List adapters
get/api/adapters
Returns metadata for every registered adapter type, with its catalog category. Rate limited: 30 req / 60 s.
Auth: Bearer token (how to get one) · Operation: listAdapters
Responses
Example request
curl "$ENGINE_URL/api/adapters" \
-H "Authorization: Bearer $TOKEN"Get the FHIR store
get/api/fhir-store
The engine's FHIR store, as the adapters page's FHIR store card shows it: gcp-healthcare (a Google Cloud Healthcare API FHIR store turned on with Terraform), medplum (the bundled Medplum) or none. Reads the store's CapabilityStatement for status and returns this workspace's adapter profile for it, if any. No credentials are returned. Rate limited: 30 req / 60 s.
Auth: Bearer token (how to get one) · Operation: getFhirStore
Responses
- 200The FHIR store.
Response fields
application/json · object
kindstringrequiredOne of: "gcp-healthcare", "medplum", "none"
docsstring (uri)requiredlabelstringbaseUrlstringstatusobject3 fields
reachablebooleanrequiredfhirVersionstringerrorstring
adapterTypestringOne of: "gcp-healthcare-fhir", "medplum"
profileIdstringprofileConfigobjectmisconfiguredstring
- 401Missing or invalid JWT Bearer token.
application/json · ApiError
- 429Rate limit exceeded.
application/json · ApiError
- 500Unexpected server error.
application/json · ApiError
Example request
curl "$ENGINE_URL/api/fhir-store" \
-H "Authorization: Bearer $TOKEN"Get adapter schema
get/api/adapters/{type}
Returns the action list and formFields (the config fields, read from the adapter's schema) for one adapter type.
Auth: Bearer token (how to get one) · Operation: getAdapter
Parameters
| Name | In | Type | Description |
|---|---|---|---|
typerequired | path | string | Adapter type identifier. |
Responses
Example request
curl "$ENGINE_URL/api/adapters/fhir-rest" \
-H "Authorization: Bearer $TOKEN"Schemas
Named objects the operations above link to.
AdapterAction
namestringrequireddescriptionstringrequiredparametersobjectThe action's parameters as JSON Schema (draft-07, an object schema, no
$refs). Forms useparameterFields.parameterFieldsarray of FormFieldThe action's parameters as form fields (same shape as formFields); a send step's Config is built from them.
inputKeysarray of stringThe keys a message may supply to this action. The step's config sets every other parameter, and wins on these too.
AdapterInfo
typestringrequirednamestringrequireddescriptionstringrequiredversionstringrequiredcategorystring | nullGET /api/adapters only. The catalog category the New connection screen groups the type under; null for a type the catalog doesn't know.
One of: "EHR", "FHIR servers", "APIs", "Messaging", "Files & cloud", "Databases", "Writers"
readOnlybooleanThe adapter only reads or receives: write() always fails. The builder leaves it out of send profile lists, and an enabled workflow that sends through it is rejected (400 DESTINATION_READ_ONLY).
formFieldsarray of FormFieldGET /api/adapters/{type} only. The config fields, read from the adapter's schema, in the order a form shows them.
configSchemaobject | nullThe adapter profile's config as JSON Schema (draft-07, no
$refs). Forms useformFields.
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.
FormField
pathstringrequiredDotted config path.
keystringrequiredlabelstringrequiredkindstringrequiredsecretandmultilinehold credentials.recordis a JSON object of free keys (header maps).arrayitems areitem.One of: "string", "url", "number", "boolean", "enum", "secret", "multiline", "object", "array", "record"
requiredbooleanrequireddefaultanyThe adapter's default for this field.
descriptionstringoptionsarray of stringitemstringArray fields: the kind of each item.
secretbooleanRecord fields that hold credentials (header maps).
childrenarray of FormFieldObject fields (and arrays of objects): their fields.
showWhenobjectShow only while the selector
key(authType, authentication) has one ofvalues.2 fields
keystringrequiredvaluesarray of stringrequired