Skip to content
Audit & ReportsMarkdown

Change history

Every change made to one user, group, agent or setting, newest first, with who made it and what changed, secrets left out.

Available, with limitsAPI

Every object in the realm keeps its own history: each time a user, a group, an agent, a client or a setting is created, changed or deleted, the realm records who did it and what changed, including the links added or removed, such as a group’s members. Reading one object’s history answers who changed this, and how?

This is limited today: a link change shows on the history of the object it was made through, not on both ends, and a deleted object’s history can’t be read.

  • Privilege: the same access as reading the object: READ on the realm, which RealmViewer and RealmOwner both give.
  • Where: the API.
  • What you need first: the object’s type and name, as you address it: group/engineering, user/maya, agent/invoice-agent, or a setting such as authorizationSettings/authorizationSettings.

The history is read at the object’s own address, with /history added: https://foobar.cvyuh.com/api/v0/am/objects/v1/<type>/<id>/history. It lists every change, newest first, and leaves out every value no read of the object would show, such as a password. A link added or removed, such as a member joining a group, is an UPDATED entry on the object whose link changed, listing the link in edgeChanges.

Each entry says what was done and by whom:

{
"id": "<record id>",
"eventType": "UPDATED",
"eventTime": "<event time>",
"objectId": "<the group's id>",
"changedBy": "<the id of who made the change>",
"changedFields": ["member"],
"before": { "…": "the group as it was" },
"after": { "…": "the group as it became" },
"edgeChanges": { "member": { "added": [ { "…": "the link to ben" } ] } },
"subjectRev": "5",
"component": "entity",
"traceId": "<trace id>",
"transactionId": "<transaction id>"
}
FieldWhat it holds
eventTypeCREATED, UPDATED, PATCHED or DELETED
changedByThe id of the user or agent who made the change
changedFieldsThe fields and links that changed, secret ones named but never shown
before, afterThe object before and after, secret values left out
edgeChangesFor each link field, the links added, changed and removed, and removedAll when every link went
subjectRevThe object’s revision after the change

There’s nothing to set up. Read the history of the engineering group (Call the API shows how to get $CVYUH_SESSION):

Terminal window
curl "https://foobar.cvyuh.com/api/v0/am/objects/v1/group/engineering/history?page=1&pageSize=50" \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

The same works for any type: user/maya, agent/invoice-agent, or a setting such as authorizationSettings/authorizationSettings.

AnswerWhyWhat to do
200 with no entriesThe object has no changes yet, or it no longer existsCheck the name; a deleted object’s history can’t be read here
400A page so large it is past any historyPage forward from 1
401No session, or it has endedSign in again
403No read access to the objectAsk for RealmViewer
WhatDefaultRange
pageSize501 to 500
page1From 1
OrderNewest firstFixed
Total countNot givenPage until a page comes back short
SymptomCauseFix
A member you know was added isn’t in the group’s historyThe link was made through the user (their memberOf), so it is recorded on the userRead the user’s history too
The history is empty for an object you deletedA deleted object’s history can’t be read hereIts changes are kept; see Retention and sites
You can’t tell how many entries there areThe history isn’t countedAsk for the next page until one comes back with fewer than pageSize entries

Reading a history adds nothing to it. Every change it lists is a record on the realm’s trail, kept for the life of the realm.

  • A link change is recorded once, on the object it was made through. A member added through the group shows on the group’s history; one added through the user’s memberOf shows on the user’s.
  • An agent’s changes are here, not on its trail. An agent’s trail comes back without them today: read the agent’s history.
  • Names in a history are ids. changedBy and objectId are ids; read the object to see its name.