Skip to main content

List recent out-of-bed notifications

MethodPath
GET/v1/slim/notifications/recent/oob

Authentication · Access policies

Lists the newest active out-of-bed notifications for your project. Use it for an out-of-bed notification bell.

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​

  • Out-of-bed is evaluated and recorded by Ovok, as CommunicationRequests. Medical notifications are not here: read GET /v1/slim/notifications/recent/medical for those, so one event is never counted by both bells.
  • Returns at most count rows (1 to 50, default 20), newest first by event time.
  • Rows come from a Redis copy of the active out-of-bed notifications when that copy is enabled, loaded, and known to hold every out-of-bed row. Otherwise they come from a Medplum search limited to out-of-bed, so the bell never under-reports. warm and source (redis or medplum) say which happened.
  • total counts out-of-bed rows only, so a "9+" badge counts what the list shows. From Medplum it is an estimate, capped at the list result cap (1,000 by default).
  • An episode that has ended but has not been acknowledged stays active, and so stays in this bell, until someone acknowledges it with PATCH /v1/slim/notifications/{id}/ack.

Example​

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

Successful response​

200 — Recent out-of-bed 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.