API - Get Composition


This API retrieves a Composition resource.

Scope


This transaction involves the requestor sending a GET request to the FHIR service to retrieve the Composition resource based on the id.

Upon successful retrieval, the FHIR Service returns an HTTP response code (i.e 2xx) and a

Command 'link' could not render: Object reference not set to an instance of an object.
resource.

For unsuccessful retrieval, the FHIR Service returns an HTTP response code (i.e 4xx or 5xx) and an OperationOutcome resource.

Interaction Diagram


Could not find subject. File was not found for images/get-composition.png

Specification


The Get Composition FHIR specification is based on the HL7 FHIR R5 RESTful read API. (Ref: https://www.hl7.org/fhir/http.html)

Invocations

GET [base]/Composition/{id}

The Get Composition Request will retrieve a Composition resource from AWS S3 in the form of a json file. The get interaction is performed by an HTTP GET command.

Example

Type Value
Method GET
Headers Content-Type: application/fhir+json
URL [base]/Composition/12345678

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/composition-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