Skip to content
Engine API

Adapters

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

On this page

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

  • 200Adapter catalog.
    Response fields

    application/json · object

    • adaptersarray of AdapterInforequired
    • totalintegerrequired
  • 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/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

    • kindstringrequired

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

    • docsstring (uri)required
    • labelstring
    • baseUrlstring
    • statusobject
      3 fields
      • reachablebooleanrequired
      • fhirVersionstring
      • errorstring
    • adapterTypestring

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

    • profileIdstring
    • profileConfigobject
    • misconfiguredstring
  • 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/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

NameInTypeDescription
typerequiredpathstring

Adapter type identifier.

Responses

  • 200Adapter detail.
    Response fields

    application/json · object

  • 401Missing or invalid JWT Bearer token.

    application/json · ApiError

  • 404The requested resource was not found.

    application/json · ApiError

  • 429Rate limit exceeded.

    application/json · ApiError

  • 500Unexpected server error.

    application/json · ApiError

Example request

curl
curl "$ENGINE_URL/api/adapters/fhir-rest" \
  -H "Authorization: Bearer $TOKEN"

Schemas

Named objects the operations above link to.

AdapterAction

  • namestringrequired
  • descriptionstringrequired
  • parametersobject

    The action's parameters as JSON Schema (draft-07, an object schema, no $refs). Forms use parameterFields.

  • parameterFieldsarray of FormField

    The action's parameters as form fields (same shape as formFields); a send step's Config is built from them.

  • inputKeysarray of string

    The keys a message may supply to this action. The step's config sets every other parameter, and wins on these too.

AdapterInfo

  • typestringrequired
  • namestringrequired
  • descriptionstringrequired
  • versionstringrequired
  • categorystring | null

    GET /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"

  • readOnlyboolean

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

  • actionsarray of AdapterActionrequired
  • formFieldsarray of FormField

    GET /api/adapters/{type} only. The config fields, read from the adapter's schema, in the order a form shows them.

  • configSchemaobject | null

    The adapter profile's config as JSON Schema (draft-07, no $refs). Forms use formFields.

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.

FormField

  • pathstringrequired

    Dotted config path.

  • keystringrequired
  • labelstringrequired
  • kindstringrequired

    secret and multiline hold credentials. record is a JSON object of free keys (header maps). array items are item.

    One of: "string", "url", "number", "boolean", "enum", "secret", "multiline", "object", "array", "record"

  • requiredbooleanrequired
  • defaultany

    The adapter's default for this field.

  • descriptionstring
  • optionsarray of string
  • itemstring

    Array fields: the kind of each item.

  • secretboolean

    Record fields that hold credentials (header maps).

  • childrenarray of FormField

    Object fields (and arrays of objects): their fields.

  • showWhenobject

    Show only while the selector key (authType, authentication) has one of values.

    2 fields
    • keystringrequired
    • valuesarray of stringrequired