Aidbox.bulk data import
aidbox.bulk/* RPC operations
Overview
aidbox.bulk API uses Aidbox JSON RPC API
Features of the aidbox.bulk API:
- Asynchronous validation of uploaded resources & references
- Human readable validation errors
- Can process Aidbox & FHIR format
RPC methods
aidbox.bulk/import-start
Starts aidbox.bulk import.
Object with the following structure:
formatinput resources format,fhiroraidbox(default:fhir)metameta data that will be attached to each of the imported resourceson-conflictaction to resolve id uniqueness constraint violation,updateoroverrideinputarray of objectsurlstring with input source url
Resource requirements for aidbox.bulk/import-start:
| Operation | id | resourceType |
|---|---|---|
aidbox.bulk/import-start | Required | Required |
Example
POST /rpc
content-type: text/yaml
accept: text/yaml
method: aidbox.bulk/import-start
params:
on-conflict: update
id_prefix: app1
format: fhir
meta: {source: app1}
input:
- {url: 'https://storage.googleapis.com/aidbox-public/synthea/100/corrupted-patient.ndjson.gz'}
aidbox.bulk/import-status
Returns latest aidbox.bulk import info
Expects no parameters
Example
POST /rpc
content-type: text/yaml
accept: text/yaml
method: aidbox.bulk/import-status
params: {}
aidbox.bulk/import-errors
Returns latest aidbox.bulk import detailed errors list
Object with the following structure:
omit-resources?(default:false)
Example
POST /rpc
content-type: text/yaml
accept: text/yaml
method: aidbox.bulk/import-errors
params:
omit-resources?: true
aidbox.bulk/import-cancel
Cancels latest aidbox.bulk import
Expects no parameters
Example
POST /rpc
content-type: text/yaml
accept: text/yaml
method: aidbox.bulk/import-cancel
Import local file
Sometimes you want to import local file into local Aidbox. Possible solutions for local development:
Add volume to the aidboxone container (not aidboxdb):
volumes:
- ./Encounter.ndjson.gz:/resources/Encounter.ndjson.gz
# url: file:///resources/Encounter.ndjson.gz
Use tunneling e.g. ngrok:
python3 -m http.server
ngrok http 8000
# url: https://<...>.ngrok-free.app/Encounter.ndjson.gz