Adapter: FHIR REST API
Connect to FHIR R4 or R5 compliant servers.
Purpose
Read, search, create and update resources on any FHIR R4 (or R5) server. Use it for a FHIR server that has no vendor adapter of its own, and as the destination of HL7v2-to-FHIR workflows.
Auth
none,basic,bearer,oauth2(client credentials),backend-services(SMART Backend Services with an RS384 client assertion) orgcp-workload-identity.- Tokens are cached and fetched again once after a 401.
- It takes the shared connection options: a client certificate for mutual TLS, a private CA, a minimum TLS version and a proxy. They apply to its token requests too.
Settings
Auth is chosen with authType: none, basic, bearer, gcp-workload-identity, oauth2, backend-services. Dotted names are fields inside an object setting. Secret settings are encrypted at rest, never returned by a read, and shown masked in the console and in exports; their defaults are not shown.
| Setting | Type | Required | Default | Secret | Description |
|---|---|---|---|---|---|
baseUrl | url | Yes | No | FHIR server base URL. | |
authType | enum: none, basic, bearer, gcp-workload-identity, oauth2, backend-services | Yes | No | Authentication method. gcp-workload-identity: a token from the GKE metadata server (GCP Healthcare API). oauth2: client credentials. backend-services: SMART Backend Services (RS384 client assertion). | |
credentials | object | No | |||
credentials.username | string | No | No | Used when authType is basic. | |
credentials.password | string | No | Yes | Used when authType is basic. | |
credentials.token | string | No | Yes | Used when authType is bearer. | |
credentials.clientId | string | No | No | Used when authType is oauth2 or backend-services. | |
credentials.clientSecret | string | No | Yes | Used when authType is oauth2. | |
credentials.tokenUrl | url | No | No | Used when authType is oauth2 or backend-services. | |
credentials.privateKeyPEM | string | No | Yes | Used when authType is backend-services. | |
credentials.keyId | string | No | No | Used when authType is backend-services. | |
credentials.scopes | string | No | No | OAuth scopes (default: system/*.read system/*.write). Used when authType is oauth2 or backend-services. | |
headers | map | No | Yes | Additional HTTP headers. | |
timeout | number | No | No | Request timeout in milliseconds. | |
fhirVersion | enum: R4, R5, auto | No | auto | No | FHIR version. "auto" detects from CapabilityStatement on first connection. |
tlsCaPem | string | No | Yes | PEM CA certificate(s) to verify the server against. See tlsCaMode. | |
tlsCaMode | enum: replace, add | No | No | Trust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem. | |
tlsClientCertPem | string | No | Yes | PEM client certificate, for servers that require mutual TLS. Set with tlsClientKeyPem. | |
tlsClientKeyPem | string | No | Yes | PEM private key for the client certificate (encrypted at rest). | |
tlsClientPfx | string | No | Yes | Client certificate and key as a base64 PKCS#12 (.p12 / .pfx) bundle, instead of the PEM pair. | |
tlsClientPassphrase | string | No | Yes | Passphrase of the PKCS#12 bundle. | |
tlsMinVersion | enum: TLSv1.2, TLSv1.3 | No | No | Lowest TLS version to accept (default TLSv1.2). | |
proxyUrl | url | No | No | HTTP(S) proxy, e.g. http://proxy.example.test:3128 (opens in a new tab). The proxy host must pass the SSRF rules (SSRF_ALLOWLIST for a private one). | |
proxyUsername | string | No | No | Proxy user (Basic auth). | |
proxyPassword | string | No | Yes | Proxy password. | |
noProxy | array of string | No | No | Hosts sent direct, not through the proxy: a name (and its subdomains), .suffix, host:port or *. |
Actions
A trailing ? marks an optional step parameter. A message can supply only the keys in the last column; everything else comes from the step.
| Action | What it does | Step parameters | Keys a message may supply |
|---|---|---|---|
read | Read a FHIR resource by ID. | resourceType, id | resourceType, id |
search | Search FHIR resources. | resourceType, searchParams?, maxPages? | searchParams |
create | Create a new FHIR resource (conditional create with ifNoneExist). | resource, ifNoneExist? | None |
update | Update an existing FHIR resource, or upsert one by search (conditional update). | resource, conditionalUpdate? | None |
Minimal example
The smallest profile the engine accepts: the required settings only, with synthetic values. Create it with POST /api/adapter-profiles, then test it with POST /api/adapter-profiles/{id}/test.
{
"name": "FHIR REST API (example)",
"adapterType": "fhir-rest",
"config": {
"baseUrl": "https://fhir-rest.example.test/base",
"authType": "none"
}
}Limits
searchfollowsnextlinks for up tomaxPagespages (1 to 50, default 1).- A
createstep'sifNoneExistis sent asIf-None-Exist, so a resent message finds the resource it created the first time. - A resource id or type that comes from a message is checked before it reaches a URL, so it cannot leave the configured base.
- The engine refuses a URL that resolves to a private address unless the host is in
SSRF_ALLOWLIST(see Environment variables).