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 |
| endTime | instant | The end time of the request, in milliseconds since the unix epoch. The results will include the events that occurred after the end time and before the start time. | optional |
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 event Values:
|
required |
| resourceTypes | array[string] | One or more type(s) of the resource(s) affected Values:
|
required |
| resourceId | string | Id of the affected resource OR id of the database if more than one resource type is present | required |
| added | boolean | True if this event concerns an addition. | required |
| updated | boolean | True if this event concerns an update. | required |
| deleted | boolean | True if this event concerns a deletion. | required |
| recovered | boolean | True if this event concerns a recovery of data. | required |
| reverted | boolean | True if this event has been reverted by an administrator. | required |
| automation | object | The automation, if this event concerns an automation. | optional |
| automationId | string | The automation's id | required |
| label | string | A human-readable label for this automation | required |
| resourceId | string | The resource (form, or subform) to which this automation applies. | required |
| trigger | string | The trigger that applies to this automation Values:
|
required |
| triggerFormula | string | The formula to which this automation applies. currently not supported | optional |
| action | object | The action to be performed by this automation | required |
| active | boolean | Determines whether this automation is active or not | required |
| mergeId | string | The merge id, if this event concerns a merge of records. | optional |
| 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 |