Gets entries from the database's audit log.
Request
POST https://www.activityinfo.org/resources/databases/{databaseId}/audit
Request body
application/json
object | |||
resourceFilter | string | The id of a form, folder, or report. If provided, the result will only include events that relate to this resource. | optional |
typeFilter | array[string] | Only include events of the given types.Values:
|
required |
startTime | integer | The start time of the request, in milliseconds since the unix epoch. The results will include the first 100 - 150 events that occurred before this time. | required |
Successful response
application/json
object | |||
events | array[object] | List of matching auditable events. | required |
id | string | An opaque, id uniquely identifying this event within this result set. | required |
time | float | The time of this event, in seconds since 1970-01-01. | required |
user | object | The user who initiated this event. | optional |
id | string | required | |
name | string | required | |
string | required | ||
recordRef | object | The record ref, if this event concerns a record. | optional |
formId | string | required | |
recordId | string | required | |
formId | string | The form id, if this event concerns a form. | optional |
version | integer | The version number of the affected resource. | required |
databaseUserId | string | For user permission events, this is the id of the user who was affected. | optional |
description | string | A human-readable description of the event. | required |
type | string | The type of eventValues:
|
required |
deleted | boolean | True if this event concerns a deletion. | required |
reverted | boolean | True if this event has been reverted by an administrator. | required |
startTime | float | The start time, in seconds since 1970-01-01 of the request. This is the time provided in the request. | required |
endTime | float | The end time, in seconds since 1970-01-01. This is the time of the earliest audit event in the result set. | required |
moreEvents | boolean | True if there are more events earlier than endTime available, but not included in this response. Submit a new request with a startTime equal to the endTime to fetch the next batch. | required |
Error responses
Status Code | Error Code | Description |
---|---|---|
401 | AUTHENTICATION_ |
The request must be authenticated |
403 | FORBIDDEN | Permission denied |
404 | NOT_ |
The resource could not be found |
410 | DELETED | The resource has been deleted |