Skip to content

Commit

Permalink
Minor updates and split into separate PRs for POST and GET
Browse files Browse the repository at this point in the history
  • Loading branch information
dlzhry2nhs committed Dec 1, 2023
1 parent 6d9476a commit b433869
Showing 1 changed file with 6 additions and 161 deletions.
167 changes: 6 additions & 161 deletions specification/multicast-notification-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ paths:
summary: "Subscribe to events"
description: |
### Overview
Use this endpoint to subscribe to patient-related events.
Use this endpoint to subscribe to patient-related signals.
### Sandbox testing
You can test the following scenarios in our sandbox environment:
Expand Down Expand Up @@ -387,21 +387,16 @@ paths:
requestBody:
required: true
content:
application/json:
application/fhir+json:
schema:
type: "object"
required:
- "id"
- "resourceType"
- "status"
- "end"
- "reason"
- "criteria"
- "channel"
properties:
id:
type: "string"
description: "The UUID of the Subscription, provided by the system."
resourceType:
type: "string"
description: "The subscription FHIR Resource: https://hl7.org/fhir/R4/subscription.html"
Expand All @@ -414,10 +409,10 @@ paths:
description: "Optional expiry date/time for the subscription. For example: YYYY-MM-DDThh:mm:ss.sss+zz:zz (e.g. 2015-02-07T13:28:17.239+02:00 or 2017-01-01T00:00:00Z)"
reason:
type: "string"
description: "A description of why this subscription is defined."
description: "A description of why this subscription is required."
criteria:
type: "string"
description: " Criteria for the subscription."
description: "Criteria for the subscription."
channel:
type: "object"
required:
Expand All @@ -435,15 +430,13 @@ paths:
payload:
type: "string"
description: "The mime type to send the payload in - either application/fhir+xml, or application/fhir+json. If the payload is not present, then there is no payload in the notification, just a notification. The mime type 'text/plain' may also be used for Email and SMS subscriptions."

examples:
newSubscriptionRequest:
value:
id: "236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b"
resourceType: "subscription"
resourceType: "Subscription"
status: "active"
end: "2022-04-05T17:31:00.000Z"
reason: "A description of why this subscription is defined."
reason: "A description of why this subscription should be created."
criteria: "eventType=pds-change-of-gp-1&;patient.identifier=123455435"
channel:
type: "message"
Expand Down Expand Up @@ -534,151 +527,3 @@ paths:
type: string
description: Object containing the different errors on a per key basis
example: Internal server error

get:
summary: "Retrieve all Subscriptions belonging to the requester"
description: |
### Overview
Use this endpoint to retrive subscription information for all a requester's existing subscriptions.
### Sandbox testing
You can test the following scenarios in our sandbox environment:
| Scenario | Request | Response |
| ----------------------------------------- | ------------------------------------------- | ----------------------------------------------------------------------- |
| Retrive a Subscription | Content-Type: `application/json` | HTTP Status 200 and response original subscription payload information. |
You can try out the sandbox using the 'Try this API' feature on this page.
operationId: get-all-subscriptions
parameters:
- name: Authorization
in: header
required: true
description: |-
An [OAuth 2.0 bearer token](https://digital.nhs.uk/developer/guides-and-documentation/security-and-authorisation/application-restricted-restful-apis-signed-jwt-authentication).
Required in all environments except sandbox.
schema:
type: string
format: '^Bearer [[:ascii:]]+$'
example: Bearer g1112R_ccQ1Ebbb4gtHBP1aaaNM
- name: X-Correlation-ID
in: header
required: true
description: |-
An ID which is used to track transactions across multiple systems. It can take any value, but we recommend avoiding `.` characters.
Mirrored back in a response header.
schema:
type: string
example: 11C46F5F-CDEF-4865-94B2-0EE0EDCC26DA

responses:
200:
description: Success - a list of all subscriptions the user created or has permissions to view
content:
application/json:
schema:
type: array
items:
type: object
properties:
id:
type: string
resourceType:
type: string
status:
type: string
end:
type: string
format: date-time
reason:
type: string
criteria:
type: string
channel:
type: object
properties:
type:
type: string
endpoint:
type: string
payload:
type: string
example:
- id: "236a1d4a-5d69-4fa9-9c7f-e72bf505aa5b"
resourceType: "subscription"
status: "active"
end: "2022-04-05T17:31:00.000Z"
reason: "A description of why this subscription was created."
criteria: "eventType=pds-change-of-gp-1&;patient.identifier=123455435"
channel:
type: "message"
endpoint: "arn:aws:sqs:eu-west-2:123456789012:queue1"
payload: "text/cloud-event"
- id: "236a1d4b-5d60-4fa9-9c7g-e72bf505aa5c"
resourceType: "subscription"
status: "active"
end: "2022-04-05T17:31:00.000Z"
reason: "A description of why this subscription was created."
criteria: "eventType=pds-change-of-gp-1"
channel:
type: "message"
endpoint: "arn:aws:sqs:eu-west-2:123456789012:queue1"
payload: "text/cloud-event"
401:
description: "Unauthenticated error"
content:
application/json:
schema:
type: object
properties:
fault:
type: object
properties:
faultstring:
type: string
detail:
type: object
properties:
errorcode:
type: string
examples:
invalidToken:
value:
fault:
faultstring: "Invalid access token"
detail:
errorcode: "oauth.v2.InvalidAccessToken"
tokenMissing:
value:
fault:
faultstring: "Missing access token"
detail:
errorcode: "oauth.v2.MissingAccessToken"
tokenExpired:
value:
fault:
faultstring: "Access Token expired"
detail:
errorcode: "keymanagement.service.access_token_expired"
403:
description: "Unauthorized error"
content:
application/json:
schema:
type: object
properties:
errors:
type: string
description: Object containing the different errors on a per key basis
example: User is not authorized to access this endpoint
500:
description: "Internal error"
content:
application/json:
schema:
type: object
properties:
errors:
type: string
description: Object containing the different errors on a per key basis
example: Internal server error

0 comments on commit b433869

Please sign in to comment.