Skip to main content

List recent notifications

MethodPath
GET/v1/slim/notifications/recent

Authentication · Access policies

Lists the newest active notifications stored as CommunicationRequests for your project, of every type (such as out-of-bed, device alarms and attention presses). Use it for a notification bell. For filtered or paged history, use the out-of-bed and alarm feeds.

Auth: Bearer token. The caller must be a practitioner, an admin, a super admin, or hold the "System Owner" access policy. The access policy must grant CommunicationRequest:read and CommunicationRequest:search (admins and super admins skip this check). Scope: The caller's project (from the token).

Behaviour​

  • Returns at most count rows (1 to 50, default 20), newest first by event time.
  • Rows come from a Redis copy of the active notifications when that copy is enabled and loaded, and from a Medplum search otherwise. warm is true and source is redis for the first case; warm is false and source is medplum for the second. A cold read also starts loading the Redis copy in the background, so a later call can be warm.
  • The Medplum search returns active notifications updated within the last year.
  • total counts the active notifications the source knows about, capped at the list result cap (1,000 by default). From Medplum it is an estimate.
  • Rows whose notification type cannot be resolved are left out.
  • Medical notifications (heart rate, respiratory rate and other vitals) are decided by Signals and served by GET /v1/slim/notifications/recent/medical. To show one type only, use GET /v1/slim/notifications/recent/oob or GET /v1/slim/notifications/recent/alarms.

Example​

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/notifications/recent?count=20' \
-H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response​

200 — Recent notifications retrieved successfully.

Errors​

StatusMeaning
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, you lack CommunicationRequest:read or CommunicationRequest:search, your session has no project, or you cannot access the project.
422A query parameter fails validation.
504The Medplum search on the fallback path timed out.