@Path("users")
    public UserHistoryResource getUserHistory() throws GuacamoleException {
        try {
            return new UserHistoryResource(userContext.getUserHistory());
        }
        catch (GuacamoleUnsupportedException e) {
            return new UserHistoryResource(new SimpleActivityRecordSet<>());
        }
    }
Retrieves the login history for all users. Filtering may be applied via
the returned UserHistoryResource.

@return
    A resource which exposes user records that may optionally be
    filtered, each record describing the start and end times of a user
    session.

@throws GuacamoleException
    If an error occurs while retrieving the user history.
guacamole/src/main/java/org/apache/guacamole/rest/history/HistoryResource.java