API - Get Binary
This API retrieves a Binary resource.
Scope
This transaction involves the requestor sending a GET request to the FHIR service to retrieve the Binary resource based on the id and format (i.e mime) type.
Upon successful retrieval, the FHIR Service returns an HTTP response code (i.e 2xx) and a
For unsuccessful retrieval, the FHIR Service returns an HTTP response code (i.e 4xx or 5xx) and an OperationOutcome resource.
Interaction Diagram
Specification
The Get Binary FHIR specification is based on the HL7 FHIR R5 RESTful read API. (Ref: https://www.hl7.org/fhir/http.html)
Invocations
GET [baseURL]/Binary/{id}?_format={mimeType}
The Get Binary List Request will retrieve a Binary resource from AWS S3 containing data encoded in base64. The get interaction is performed by an HTTP GET command as shown.
Example
Type | Value |
---|---|
Method | GET |
Headers | Content-Type: application/fhir+json |
URL | [base]/Binary/12345678?_format=application/jpeg |
Message Response
Depending on the HTTP Status Code, the following resources will be sent back to the requestor.
HTTP Status Code | Example |
---|---|
201 Created | Command 'json' could not render: File was not found for examples/binary-response.json |
4xx, 5xx | Command 'json' could not render: File was not found for examples/OperationOutcome-notfound.json |
Business Level Errors
This section details the business level errors exposed by OperationOutcome resource for this operation. Refer to API Error Handling for framework level errors.
For illustration only
http status code | code | details.coding.code | details.text |
---|---|---|---|
404 | not-found | E-10000 | No matching resource found based on id |