$import & /fhir/$import
$import
is an implementation of the upcoming FHIR Bulk Import API. This is an asynchronous Operation, which returns url to monitor progress. There are two versions of this operation - /fhir/$import
accepts data in FHIR format, /$import
works with Aidbox format.
Resource requirements for all import operations:
/$import
Required
Not required
/fhir/$import
Required
Not required
Keep in mind that $import does not validate inserted resources for the sake of performance. Pay attention to the structure of data you insert and use the correct URL for your data format, i.e.: use /fhir prefix for FHIR data.
Please consider using Asynchronous validation API to validate data after $import
Example
You can monitor progress by using id
you provided in request body.
If you didn't provide id
in request body, you can use content-location
in response header.
Parameters
id
Identifier of the import
contentEncoding
Supports gzip
or plain
(non-gzipped .ndjson files)
inputs
Resources to import
update
Update history for updated resources (false by default)
Note
For performance reasons $import
does raw upsert into resource table without history update. If you want to store the previous version of resources in history, please set update = true
With this flag Aidbox will update history for updated resources. For each resource:
if resource was not present in DB before the import, the import time will be the same.
if resource was present in DB before and it's updated during the import, it will double the time importing this resource because of additional insert operation into
_history
table.
Last updated