跳到主要内容

getLastAuditEvents

AuditEventArrayWrapper getLastAuditEvents()

GET /api/2.0/security/audit/events/last

Get recent audit events

Returns the twenty most recent audit events of the portal - the creations, changes, deletions, sharing and settings updates its members made - as the short summary a settings page shows before anyone asks for the full trail. The caller needs the portal-settings right of a DocSpace administrator, and in a cloud installation the login history and audit trail section must be enabled for the portal, otherwise the call is answered with 402. The operation is read-only and takes no parameters: it looks back exactly as far as the audit trail lifetime that GET api/2.0/security/audit/settings/lifetime reports, returns at most twenty events ordered newest first, and cannot be filtered. date is given in the portal time zone, actionText is the readable sentence describing the event with every substituted value shortened to fifty characters here, and target names the entity the action was applied to. An empty list means nothing was recorded inside that period. Use GET api/2.0/security/audit/events/filter to filter by user, module, action or period.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The twenty most recent audit events of the portal, newest firstAuditEventArrayWrapperX-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset
402The login history and audit trail section is not enabled for this portal--
403The caller does not have the portal-settings right of a DocSpace administrator--
401UnauthorizedErrorApiResponse-
429Too Many Requests.ErrorApiResponseRetry-After
500Internal Server Error.ErrorApiResponse-
502Bad Gateway. Returned by the reverse proxy, response body may be HTML and not JSON.--
503Service Unavailable. Returned by the reverse proxy, response body may be HTML and not JSON.--

Return type​

AuditEventArrayWrapper

Authorization​

Basic, OAuth2 (scopes: read, write), ApiKeyBearer, asc_auth_key, Bearer, OpenId

HTTP request headers​

  • Content-Type: Not defined
  • Accept: application/json