Get Subscription
The Get Subscription interaction retrieves the details of an existing subscription. This interaction allows a subscriber or system to query the subscription registry to obtain information such as the subscription status, filtering criteria, notification endpoint, and other metadata. It ensures that subscribers can verify, manage, and maintain their active subscriptions within the Ontario Health ecosystem..
Specification
This specification is based on the FHIR R5 Backport Get operations.
Usage
Get Subscription Request
The Get Subscription shall retrieve the specified FHIR Subscription resource from the repository.
`GET [base]/Subscription/[subscription-id]`,
where [subscription-id] is the logical id of the existing Subscription resource.
Get Subscription Response
The server returns a 200 OK HTTP status code.
The server returns a 200 OK HTTP status code, and also returns a copy the Subscription resourse in the HTTP body.
Interaction Sequence Diagram
Example of Get Subscription Interaction
Example GET Request
HTTP Method:
GET
Headers:
Content-Type: application/fhir+json
Address:
[base]/Subscription/1455
Example GET Response Body
HTTP Body contains a FHIR R5 Backport Subscription resource, conformant to Profile: Subscription
{ "resourceType": "Subscription", "id": "example-subscription", "meta": { "profile": [ "http://hl7.org/fhir/uv/subscriptions-backport/StructureDefinition/backport-subscription" ] }, "status": "active", "reason": "Notify client of new lab results", "criteria": "Observation?code=http://loinc.org|12345-6", "channelType": { "system": "http://terminology.hl7.org/CodeSystem/subscription-channel-type", "code": "rest-hook" }, "endpoint": "https://client.example.com/fhir/notifications", "heartbeatPeriod": 300, "timeout": 0, "content": "full-resource", "notificationUrlLocation": "header", "filterBy": [ { "resourceType": "Observation", "filterParameter": "code", "value": "http://loinc.org|12345-6" } ], "parameter": [ { "name": "max-count", "valueInteger": 10 } ] }
Expected Behaviour
Case | Scenario Description | HTTP Status Code | Response Payload |
---|---|---|---|
1 | An existing Subscription is retrievd from the repository | HTTP 200 | Retrieved |
2 | The requested Subscription based on the provided logical id does not exist | HTTP 404 | Resource not found. Returns an OperationOutcome resource indicating an issue. |
3 | Subscription API validates the request but cannot return a valid response due to internal issues. | HTTP 500 | Internal Server Error. Returns an OperationOutcome resource indicating an issue. |