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.
- Backends
- PostgreSQLElasticsearch
- Interactions
- CreateReadUpdatePatchDelete
- Search
- 6 of 6 parameters tested
Structure
| Element | Card. | Type | Description |
|---|---|---|---|
statusRequired?!Σ | 1..1 | code | requested | active | error | offBinding (required): subscription-status |
contactΣ | 0..* | ContactPoint | Contact details for source (e.g. troubleshooting) |
endΣ | 0..1 | instant | When to automatically delete the subscription |
reasonRequiredΣ | 1..1 | string | Description of why this subscription was created |
criteriaRequiredΣ | 1..1 | string | Rule for server push |
errorΣ | 0..1 | string | Latest error note |
channelRequiredΣ | 1..1 | BackboneElement | The channel on which to report matches to the criteria |
typeRequiredΣ | 1..1 | code | rest-hook | websocket | email | sms | messageBinding (required): subscription-channel-type |
endpointΣ | 0..1 | url | Where the channel points to |
payloadΣ | 0..1 | code | MIME type to send, or omit for no payloadBinding (required): mimetypes |
headerΣ | 0..* | string | Usage depends on the channel type |
Σ in _summary results · ?! modifier element · 1.. required · inherited elements in grey
Search parameters
Query with GET [base]/Subscription?[parameter]=[value]. Type decides which modifiers and prefixes apply, see search features.
| Parameter | Type | Description | PG | ES |
|---|---|---|---|---|
contact | token | Contact details for the subscription Subscription.contact | ||
criteria | string | The search rules used to determine when to send a notification Subscription.criteria | ||
payload | token | The mime-type of the notification payload Subscription.channel.payload | ||
status | token | The current state of the subscription Subscription.status | ||
type | token | The type of channel for the sent notifications Subscription.channel.type | ||
url | uri | The uri that will receive the notifications Subscription.channel.endpoint |
PG: PostgreSQL, ES: Elasticsearch. passes its TestScript checks, fails, not tested yet. The author of the resource Logical id of this artifact When the resource version last changed Profiles this resource claims to conform to Security Labels applied to this resource Identifies where the resource comes from Tags applied to this resource Derived from the R4B DefinitionCommon parameters on every resource (8)
_haste-health-authorreference _idtoken _lastUpdateddate _profileuri _securitytoken _sourceuri _tagtoken _typetoken