Skip to main content

List change history

MethodPath
GET/v1/slim/change-history

Authentication · Access policies

Lists the recorded changes to thresholds, locations, zones, devices and residents in your project, newest first. Use it for the resident and administration change-history screens.

Auth: bearer token. The caller must be a practitioner, an admin or a System Owner, and needs Provenance:read. Only the Admin and System Owner access policies carry it, so other users get no change history. Scope: the caller's project (from the token). The rows are read with your token, so you only see changes recorded in your project.

Behaviour​

  • Each row is one recorded change. details.key names the change and details.values holds the values to put into its message.
  • Rows are sorted by recording time, newest first.
  • Without startDate, the list starts 30 days before now. endDate is optional. Both bounds are inclusive.
  • types limits the rows to the given change types. Omit it to get every type. Repeat the parameter to pass several types.
  • scope=global keeps only project-wide changes: organization threshold edits and device, location and zone lifecycle changes. scope=all (the default) returns every row.
  • userId, residentId, deviceId, locationId and zoneId are ids, not references. They combine with AND, so a row must concern every entity you name. userId matches the practitioner who made the change.
  • Changes a device makes itself, such as a baseline re-push after a new 7-day mean, are never listed.
  • Unknown query parameters are ignored.
  • page is zero-based and count defaults to 50, maximum 100. total is an estimate and never exceeds 10,000. Pages from offset 10,000 on come back empty, so narrow the filters or the date range to reach older rows.

Example​

curl -X GET 'https://api.sandbox.ovok.com/v1/slim/change-history?types=Threshold&types=Resident&page=0&count=50' \
-H "Authorization: Bearer ${OVOK_TOKEN}"

Successful response​

200 — Change history rows retrieved successfully.

Errors​

StatusMeaning
401Bearer token is missing, invalid or expired.
403You are not a practitioner, admin or System Owner, or you lack Provenance:read.
422A query parameter fails validation.