Rev Audit APIs
Whenever a write occurs on any entity in a Rev account, and that entity is audited, the Rev Audit Service writes the previous and current state (after the write operation) of the entity to the Audit Database, along with who performed the operation, and at what time.
The Audit APIs enables Admins to access the data in the account’s Audit Database through queries by entity or by principal (user). Querying by entity shows all tracked changes made to that entity. Querying by principal (user) shows all tracked changes applied by that principal (user) (i.e., actions performed by a particular user). When querying for a particular entity, you must pass a GUID to look up the entity by Id.
In order to use the Audit APIs, you must first ensure the Audit Service is enabled on your Rev account. To enable the Audit Service on your Rev account contact Vbrick support.
Usage
As with standard API calls, you will use an Authorization header parameter that contains a key value in this format: VBrick <auth token> where the auth token is obtained during authentication. Further, you must also know your AccountId.
Account Admins may access the AccountId from the Rev URL under Admin > Account Settings.
The URL looks like https://revUrl.com/#/admin/2abf4d7b-a22e-460b-b991-57a377a45cab/accounts where the highlighted part is the AccountId.
Important Notes:
- Only Account Admins may use these APIs.
- All APIs need fromDate and toDate parameters as a range of dates between which audit data is needed. These dates should be in ISO format and UTC time zone. Eg- 2018-04-10T16:20:56.829Z
- All audit APIs return csv response with a maximum of 100 records in one call. If there are more than 100 records for the data range queried, three headers are sent in the response – nextFromDate, totalRecords and nextContinuationToken. The user needs to send nextFromDate as fromDate and nextContinuationToken back in the subsequent call to get the next set of records.
| Method | Description | |
| GET | /network/audit/accounts/{accountId}/userAccess | User Access Audit Details |
| GET | /network/audit/accounts/{accountId}/userAccess/{userId} | User Access Audit Details of Specified User |
| GET | /network/audit/accounts/{accountId}/users | Users Audit Details |
| GET | /network/audit/accounts/{accountId}/users/{userId} | Audit Details of Specified User |
| GET | /network/audit/accounts/{accountId}/groups | All Groups Audit Details |
| GET | /network/audit/accounts/{accountId}/groups/{groupId} | Audit Details of Specified Group |
| GET | /network/audit/accounts/{accountId}/devices | All Devices Audit Details |
| GET | /network/audit/accounts/{accountId}/devices/{deviceId} | Audit Details of Specified Devices |
| GET | /network/audit/accounts/{accountId}/videos | All Videos Audit Details |
| GET | /network/audit/accounts/{accountId}/videos/{videoId} | Audit Details of Specified Videos |
| GET | /network/audit/accounts/{eventId}/events | All Events Audit Details |
| GET | /network/audit/accounts/{eventId}/events/{eventId} | Audit Details of Specified Events |
| GET | /network/audit/accounts/{accountId}/principals/{principalId} | Audit Details of Specified Principals |