Forward events to your machine
Receive FHIR Subscription and Signals webhook events on localhost while you develop.
- Complexity
- 1/5
- Clients
- Terminal
- Time
- 5 minutes
ovok listen forwards events to your machine and removes everything it created when you stop it.
Set upTerminal
Install the ovok command and sign in. Signals routes need a manager app, and FHIR Subscriptions need an app whose access policy can create one.
Forward FHIR eventsTerminal
Pass one --fhir criteria for each resource type to watch, and the local URL that receives them:
ovok listen --fhir Observation --forward-to http://localhost:3000/fhirlistenopens a FHIR WebSocket Subscription for each--fhirand posts each resource to--forward-to.- Each request is signed with
X-Signature, the way a rest-hook Subscription is signed. - Set
OVOK_LISTEN_SECRETto sign with your own secret. Otherwiselistenmakes one and prints it. - Each event prints one line: the time, the resource type and id, the status your endpoint answered and how long it took. The body is never printed.
Forward Signals eventsTerminal
Signals posts to the webhook itself, so give --signals-url a public address, such as a tunnel to your machine:
ovok listen --signals-url https://{{TUNNEL_HOST}}/signals --signals-event alert.triggeredlistencreates a temporary Signals webhook and prints its signing secret.- Without
--signals-event, it sendsalert.*. --signals-reach allreaches every resident, and--signals-reach attachedonly those attached to the webhook.
Use both groups of options to receive both kinds of events in one run.
Control the sessionTerminal
While listen runs in a terminal:
rresends the last FHIR event.cclears the screen.qor Ctrl+C stops it and removes the Subscriptions and webhook it created.
A second Ctrl+C quits at once and leaves whatever was not removed yet. listen names anything it could not remove, so you can delete it yourself.
Test your integration
| Scenario | How to trigger it | Expected result |
|---|---|---|
| FHIR event arrives | Create an Observation in your sandbox project | A line with the resource and your endpoint's status |
| Resend | Press r | The same event is posted again |
| Signals event arrives | Run ovok webhooks test <id> for the webhook listen created | A delivery reaches your tunnel |
| Cleanup | Press q | listen prints a line for each Subscription and webhook it removed |
See also
Last updated on