跳到主要内容

getLastLoginEvents

LoginEventArrayWrapper getLastLoginEvents()

GET /api/2.0/security/audit/login/last

Get recent login events

Returns the twenty most recent login events of the whole portal - successful sign-ins, sign-outs and failed attempts alike - as the short summary a settings page shows before anyone asks for the full history. 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: the number of events is fixed at twenty, nothing can be filtered, and events are ordered newest first. 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 country and city are resolved from the IP address and stay empty when it cannot be located. An empty list means the portal has recorded no login events yet. Use GET api/2.0/security/audit/login/filter to filter by user, action or period and to page through the whole history.

Parameters​

This endpoint does not need any parameter.

Responses​

Status codeDescriptionTypeResponse headers
200The twenty most recent login events of the portal, newest firstLoginEventArrayWrapperX-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​

LoginEventArrayWrapper

Authorization​

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

HTTP request headers​

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