Pritam Kumar
Pritam Kumar

Reputation: 63

Unable to get data from bulk API call

I am trying to load data in FHIRBASE through a bulk API call.I have used the below command for the same:

fhirbase --host localhost -p 5432 -d fhirbase -U postgres -W postgres --fhir=3.3.0 load -m insert http://localhost:6544/patients

This endpoint 'http://localhost:6544/patients' has json data.

Getting a response:-No Content-Location header was returned by Bulk Data API server.

Upvotes: 1

Views: 219

Answers (1)

Mike Lapshin
Mike Lapshin

Reputation: 21

Thanks for your interest in Fhirbase!

Bulk Data API is not a part of FHIR specification yet. However, there is a draft specification in the working group's GitHub repo: https://github.com/smart-on-fhir/fhir-bulk-data-docs/blob/master/export.md. This page fully describes Bulk Data API requests and responses.

Bulk Data API works asynchronously, which means that a client does not receive the response immediately, as with regular REST endpoints. Instead of that, client initiates (kick-offs) a Bulk Data API request describing data he's interested in. Server responds with 202 Accepted and returns temporary URL in Content-Location header. Client will poll this URL to know if bulk data files are ready or not.

In your case, Fhirbase complains that your Bulk Data endpoint does not return that temporary URL to get current request's status. Without that URL Fhirbase cannot proceed to actual NDJSON files download.

Upvotes: 2

Related Questions