You can dump all resources of a specified type. Aidbox will respond with Chunked Transfer Encoding ndjson stream, optionally you can get the output in FHIR format or GZIPped.

This is a memory-efficient operation. Aidbox just streams the database cursor to a socket. If your HTTP Client supports processing of Chunked Encoding, you can process resources in stream one by one without waiting for the end of the response.

GET [base]/<resourceType>/$dump

Path Parameters

ParameterRequired?TypeDescription
resourceTypetrueStringname of the resource type to be exported

Query Parameters

ParameterRequired?TypeDescription
_sincefalseStringDate in ISO format; if present, exported data will contain only the resources created after the date.
fhirfalseBooleanConvert data to the FHIR format. If disabled, the data is exported in the Aidbox format.
gzipoptionalBooleanGZIP the result. If enabled, HTTP headers for gzip encoding are also set.

Examples

Here is an example of how you can dump all patients from your box (assuming you have a client with an access policy):

Curl

curl -u bulk-client:secret $AIDBOX_BASE_URL/Patient/\$dump

REST Console

GET /Patient/$dump

Dump appointments

REST Console

GET /Appointment/$dump

Curl

curl -u bulk-client:secret $AIDBOX_BASE_URL/Appointment/\$dump

Dump patients in FHIR format

REST Console

GET /Patient/$dump?fhir=true

Curl

curl -u bulk-client:secret $AIDBOX_BASE_URL/Patient/\$dump?fhir=true

Last updated 2025-05-06T13:53:07Z