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

@return
    A resource which exposes connection records that may optionally be
    filtered, each record describing the start and end times that a
    particular connection was used.

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