Skip to content
Reference

Adapter: FHIR Bulk Data Export

Export large volumes of FHIR data via the Bulk Data Access specification.

On this page

Purpose

Run FHIR Bulk Data exports (system, patient and group level) and download the NDJSON files they produce.

Auth

  • none, basic, bearer or backend-services (SMART Backend Services).
  • 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: backend-services, bearer, basic, none (default none). 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.

SettingTypeRequiredDefaultSecretDescription
fhirBaseUrlurlYesNoFHIR server base URL.
authTypeenum: backend-services, bearer, basic, noneNononeNoAuthentication method.
credentialsobjectNo
credentials.privateKeyPEMstringNoYesRSA private key in PEM format. Used when authType is backend-services.
credentials.keyIdstringNoNoKey ID for JWT header. Used when authType is backend-services.
credentials.clientIdstringNoNoClient ID (iss/sub in JWT). Used when authType is backend-services.
credentials.tokenUrlurlNoNoToken endpoint URL. Used when authType is backend-services.
credentials.scopesstringNoNoOAuth scopes (default: system/*.read). Used when authType is backend-services.
credentials.tokenstringNoYesStatic bearer token. Used when authType is bearer.
credentials.usernamestringNoNoUsed when authType is basic.
credentials.passwordstringNoYesUsed when authType is basic.
pollIntervalMsnumberNo5000NoStatus poll interval in ms.
maxPollAttemptsnumberNo720NoMax poll attempts before timeout.
maxConcurrentDownloadsnumberNo3NoMax parallel NDJSON file downloads.
maxRecordsPerFilenumberNoNoMax records to parse per file (memory safety).
headersmapNoYesAdditional HTTP headers.
timeoutnumberNo30000NoHTTP request timeout in ms.
tlsCaPemstringNoYesPEM CA certificate(s) to verify the server against. See tlsCaMode.
tlsCaModeenum: replace, addNoNoTrust: replace = only this CA (default), add = the system CAs plus this CA. Needs tlsCaPem.
tlsClientCertPemstringNoYesPEM client certificate, for servers that require mutual TLS. Set with tlsClientKeyPem.
tlsClientKeyPemstringNoYesPEM private key for the client certificate (encrypted at rest).
tlsClientPfxstringNoYesClient certificate and key as a base64 PKCS#12 (.p12 / .pfx) bundle, instead of the PEM pair.
tlsClientPassphrasestringNoYesPassphrase of the PKCS#12 bundle.
tlsMinVersionenum: TLSv1.2, TLSv1.3NoNoLowest TLS version to accept (default TLSv1.2).
proxyUrlurlNoNoHTTP(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).
proxyUsernamestringNoNoProxy user (Basic auth).
proxyPasswordstringNoYesProxy password.
noProxyarray of stringNoNoHosts sent direct, not through the proxy: a name (and its subdomains), .suffix, host:port or *.

Actions

This adapter only reads or receives: a send step through it is refused. A trailing ? marks an optional step parameter.

ActionWhat it doesStep parametersKeys a message may supply
system-exportSystem-level $export (all data on server)._type?, _since?, _outputFormat?, _typeFilter?None
patient-exportPatient-level $export (all patients)._type?, _since?, _typeFilter?None
group-exportGroup-level $export (patients in a specific Group).groupId, _type?, _since?, _typeFilter?None
check-statusCheck status of a previously kicked-off export.statusUrlNone

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.

json
{
  "name": "FHIR Bulk Data Export (example)",
  "adapterType": "fhir-bulk",
  "config": {
    "fhirBaseUrl": "https://fhir-bulk.example.test/fhirbase"
  }
}

Limits

  • Export only: the adapter has no send action, and a send step through it is refused.
  • An export is polled every pollIntervalMs for at most maxPollAttempts polls, and files are downloaded maxConcurrentDownloads at a time.
  • The engine refuses a URL that resolves to a private address unless the host is in SSRF_ALLOWLIST (see Environment variables).

Reference