CLI

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/fhir
  • listen opens a FHIR WebSocket Subscription for each --fhir and posts each resource to --forward-to.
  • Each request is signed with X-Signature, the way a rest-hook Subscription is signed.
  • Set OVOK_LISTEN_SECRET to sign with your own secret. Otherwise listen makes 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.triggered
  • listen creates a temporary Signals webhook and prints its signing secret.
  • Without --signals-event, it sends alert.*.
  • --signals-reach all reaches every resident, and --signals-reach attached only 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:

  • r resends the last FHIR event.
  • c clears the screen.
  • q or 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

ScenarioHow to trigger itExpected result
FHIR event arrivesCreate an Observation in your sandbox projectA line with the resource and your endpoint's status
ResendPress rThe same event is posted again
Signals event arrivesRun ovok webhooks test <id> for the webhook listen createdA delivery reaches your tunnel
CleanupPress qlisten prints a line for each Subscription and webhook it removed

See also

Last updated on

On this page