GET [base]/[type]/[id]
One of the most basic interactions is used to obtain a resource by a given id. For more advanced options for getting resources, check out Search .
Response code Text Description 200OK Resource successfully found and returned 404Not Found Resource with a given id doesn't exist on the server 410Gone Resource was deleted
200 OKGet an existing patient:
Request (FHIR) Request (Aidbox) Response (FHIR) Response (Aidbox)
GET /fhir/Patient/17b69d79-3d9b-45f8-af79-75f958502763
GET /Patient/17b69d79-3d9b-45f8-af79-75f958502763
Status: 200
name:
- given: Bob
gender: male
id: 17b69d79-3d9b-45f8-af79-75f958502763
resourceType: Patient
meta:
lastUpdated: '2018-11-29T10:44:10.588Z'
versionId: '13'
extension:
- url: 'ex:createdAt'
valueInstant: '2018-11-29T10:44:10.588Z'
Status: 200
name:
- given: Bob
gender: male
id: 17b69d79-3d9b-45f8-af79-75f958502763
resourceType: Patient
meta:
lastUpdated: '2018-11-29T10:44:10.588Z'
createdAt: '2018-11-29T10:44:10.588Z'
versionId: '13'
404 Not FoundAttempt to get a non-existing patient:
Request (FHIR) Request (Aidbox) Request (FHIR) Response (Aidbox)
GET /fhir/Patient/some-not-existing-id
GET /Patient/some-not-existing-id
Status: 404
resourceType: OperationOutcome
id: 'not-found'
text:
status: generated
div: Resource Patient/some-not-existing-id not found
issue:
- severity: fatal
code: not-found
diagnostics: Resource Patient/some-not-existing-id not found
Status: 404
resourceType: OperationOutcome
id: 'not-found'
text:
status: generated
div: Resource Patient/some-not-existing-id not found
issue:
- severity: fatal
code: not-found
diagnostics: Resource Patient/some-not-existing-id not found
vread GET [base]/[type]/[id]/_history/[vid]
This one is another read interaction, but it returns a specific version resource. Similar to read, but it additionally requires to specify version id.
200 OKVersion id 13 was extracted from the response of a create interaction.
Request (FHIR) Request (Aidbox) Response (FHIR) Response (Aidbox)
GET /fhir/Patient/17b69d79-3d9b-45f8-af79-75f958502763/_history/13
GET /Patient/17b69d79-3d9b-45f8-af79-75f958502763/_history/13
Status: 200
name:
- given:
- Bob
gender: male
id: '17b69d79-3d9b-45f8-af79-75f958502763'
resourceType: Patient
meta:
lastUpdated: '2018-11-29T10:44:10.588Z'
versionId: '13'
extension:
- url: 'ex:createdAt'
valueInstant: '2018-11-29T10:44:10.588Z'
Status: 200
name:
- given:
- Bob
gender: male
id: '17b69d79-3d9b-45f8-af79-75f958502763'
resourceType: Patient
meta:
lastUpdated: '2018-11-29T10:44:10.588Z'
createdAt: '2018-11-29T10:44:10.588ZZ'
versionId: '13'