Subscription
Subscription | I | Subscription | Element IdSubscription Server push subscription criteria Alternate namesWebHook, Hook, Routing Rule DefinitionThe subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action.
| |
status | Σ ?! | 1..1 | codeBinding | Element IdSubscription.status requested | active | error | off DefinitionThe status of the subscription, which marks the server state for managing the subscription. A client can only submit subscription resources in the requested or off state. Only the server can move a subscription from requested to active, and then to error. Either the server or the client can turn a subscription off. This element is labeled as a modifier because the status contains codes that mark the resource as not currently valid. The status of a subscription. SubscriptionStatus (required)Constraints
|
contact | Σ I | 0..* | ContactPoint | Element IdSubscription.contact Contact details for source (e.g. troubleshooting) DefinitionContact details for a human to contact about the subscription. The primary use of this for system administrator troubleshooting.
|
end | Σ | 0..1 | instant | Element IdSubscription.end When to automatically delete the subscription DefinitionThe time for the server to turn the subscription off. The server is permitted to deviate from this time but should observe it.
|
reason | Σ | 1..1 | string | Element IdSubscription.reason Description of why this subscription was created DefinitionA description of why this subscription is defined. Note that FHIR strings SHALL NOT exceed 1MB in size
|
criteria | Σ | 1..1 | string | Element IdSubscription.criteria Rule for server push DefinitionThe rules that the server should use to determine when to generate notifications for this subscription. The rules are search criteria (without the [base] part). Like Bundle.entry.request.url, it has no leading "/".
|
error | Σ | 0..1 | string | Element IdSubscription.error Latest error note DefinitionA record of the last error that occurred when the server processed a notification. Note that FHIR strings SHALL NOT exceed 1MB in size
|
channel | Σ | 1..1 | BackboneElement | Element IdSubscription.channel The channel on which to report matches to the criteria DefinitionDetails where to send notifications when resources are received that meet the criteria.
|
type | Σ | 1..1 | codeBinding | Element IdSubscription.channel.type rest-hook | websocket | email | sms | message DefinitionThe type of channel to send notifications on. Note that FHIR strings SHALL NOT exceed 1MB in size The type of method used to execute a subscription. SubscriptionChannelType (required)Constraints
|
endpoint | Σ | 0..1 | url | Element IdSubscription.channel.endpoint Where the channel points to DefinitionThe url that describes the actual end-point to send messages to. For rest-hook, and websocket, the end-point must be an http: or https: URL; for email, a mailto: url, for sms, a tel: url, and for message the endpoint can be in any form of url the server understands (usually, http: or mllp:). The URI is allowed to be relative; in which case, it is relative to the server end-point (since there may be more than one, clients should avoid using relative URIs).
|
payload | Σ | 0..1 | codeBinding | Element IdSubscription.channel.payload MIME type to send, or omit for no payload DefinitionThe 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. Sending the payload has obvious security implications. The server is responsible for ensuring that the content is appropriately secured. The mime type of an attachment. Any valid mime type is allowed. Mime Types (required)Constraints
|
header | Σ | 0..* | string | Element IdSubscription.channel.header Usage depends on the channel type DefinitionAdditional headers / information to send as part of the notification. Exactly what these mean depend on the channel type. They can convey additional information to the recipient and/or meet security requirements; for example, support of multiple headers in the outgoing notifications for rest-hook type subscriptions.
|
Profile | Description | Status | URL |
---|---|---|---|
Subscription | The subscription resource is used to define a push-based subscription from a server to another system. Once a subscription is registered with the server, the server checks every resource that is created or updated, and if the resource matches the given criteria, it sends a message on the defined "channel" so that another system can take an appropriate action. | draft | http://hl7.org/fhir/StructureDefinition/Subscription |