...
eventNotificationEndpointUrl
Add the full URI for your webhook (e.g. https://www.example.com/noahevents)eventNotificationSecret
A shared secret used to compute a HMAC-SHA256 signature of the request body. The secret is created by the HIMSA Member Company developer.The secret can’t be retrieved from the Noah ES API, so it’s up to the app to manage and store the secret so it can be used to verify the authenticity and integrity of the data.
eventSubscriptions
For each event type specify if it should be sent via webhook by settingeventApi
to true for the event type.webhookVersion
The version of the webhook implementation.V1
is version 1 (default) which only send one event per webhook request.V2
is version 2 which can send multiple events per webhook request.maxEventsPerWebhookRequest
is only applicable whenwebhookVersion
isV2
and specifies the maximum number of events to send per webhook request. The valid range is from 1 to 10.
Example request:
Code Block |
---|
{ "name": "Subscription name", "eventNotificationEndpointUrl": "https://myservice.com/noahevents", "eventNotificationSecret": "mysharedsecret", "eventSubscriptions": [ { "type": "ActionCreated", "eventApi": true, "rtmApi": false, "filter": null }, { "type": "ActionUpdated", "eventApi": true, "rtmApi": false, "filter": "DataTypeCode eq any (1,15,16)" } ], "webhookVersion": "V1", "maxEventsPerWebhookRequest": 5 } |
Once you make a HTTP POST/PUT request for an event subscription, an initial "verification request" will be made to the specified eventNotificationEndpointUrl
that the endpoint must successfully respond to.
Event filtering
It's possible to filter action related events ('ActionCreated', 'ActionPreviewCreated' etc.) by specifying a filter. A filter is an expression that the event related resource must match for the event to be published. The filter is in the form of:
<PropertyName> <Operator> <Compare value>
e.g. 'DataTypeCode eq 1' to only receive action related events for actions that are of data type 1 (Audiogram actions). Logical operators can be used to specify multiple conditions e.g. 'DataTypeCode eq 1 or DataTypeCode eq 15' to only receive action related events for actions that are of data type 1 (Audiogram) and 15 (Admittance left). It's possible to use the 'any' keyword after the operator to specify a list of values that the property must match e.g. the former expression can be writen as 'DataTypeCode eq any (1,15)'. The list of values must be comma separated and enclosed in parenthesis.
Tip |
---|
For a complete list of data types / codes please see Noah defined data types and data formats |
Operators
Operator | Description | Behavior |
---|---|---|
eq | equal | The property and operator values must be identical for a match. |
ne | not equal | The property and operator values are not identical. |
Logical operators
Operator | Description | Behavior |
---|---|---|
and | Logical “and” | The filter is only a match if both expressions evaluate to true. |
or | Logical “or” | The filter is a match if either expression evaluates to true. |
Receiving Events
Your The webhookVersion
determines the message that your webhook endpoint will receive a :
V1
will send one request for each event matching your subscriptions. One request, one event.V2
can send multiple events per webhook request.
Message Body
When an event in your subscription occurs, we'll send an HTTP POST request to your web hook URL. The event will be in the Content-Type: application/json format. If webhookVersion
is V2
the message body will be an array of events. If webhookVersion
is V1
the message body will be one event:
Code Block |
---|
{ "TenantId": "5b04ef2e-5885-4d95-a1e3-852a2ba9cef1", "NotificationEventId": "be72d402-d99e-49f2-a49c-c468025bb69f", "CorrelationId": "762fe18a-488f-4c43-9813-0c549aace3f6", "NotificationEventSubscriptionId": "e6b6ecfd-e170-4bec-8657-2d9f20661af7", "TransmissionDate": "2024-02-15T08:33:45.5642258Z", "EventType": "PatientCreated", "Event": { "ResourceId": "be92eeb4-5e3f-4a79-a13d-3658db31e1f1", "EventDate": "2024-02-15T08:33:45.5599285Z", "References": [ { "Rel": "selfLegacyId", "ResourceId": "1", "Href": null }, { "Rel": "self", "ResourceId": "be92eeb4-5e3f-4a79-a13d-3658db31e1f1", "Href": "https://localhost:52599/5b04ef2e-5885-4d95-a1e3-852a2ba9cef1/api/Patients/be92eeb4-5e3f-4a79-a13d-3658db31e1f1" } ] } } |
...