@Override
    public List<? extends AuditActionContext> getAuditRecords(final Map<WhereClauseFields, Object> whereClause) {
        HttpResponse response = null;
        try {
            val date = (TemporalAccessor) whereClause.get(WhereClauseFields.DATE);
            LOGGER.debug("Sending query to audit REST endpoint to fetch records from [{}]", date);
            val parameters = CollectionUtils.<String, String>wrap("date", date.toString());
            if (whereClause.containsKey(WhereClauseFields.PRINCIPAL)) {
                parameters.put("principal", whereClause.get(WhereClauseFields.PRINCIPAL).toString());
            }
            if (whereClause.containsKey(WhereClauseFields.COUNT)) {
                parameters.put("count", whereClause.get(WhereClauseFields.COUNT).toString());
            }
            val exec = HttpExecutionRequest.builder()
                .basicAuthPassword(properties.getBasicAuthPassword())
                .basicAuthUsername(properties.getBasicAuthUsername())
                .method(HttpMethod.GET)
                .url(properties.getUrl())
                .parameters(parameters)
                .headers(properties.getHeaders())
                .build();
            response = HttpUtils.execute(exec);
            if (response != null && response.getCode() == HttpStatus.SC_OK) {
                try (val content = ((HttpEntityContainer) response).getEntity().getContent()) {
                    val result = IOUtils.toString(content, StandardCharsets.UTF_8);
                    val values = new TypeReference<List<AuditActionContext>>() {
                    };
                    return MAPPER.readValue(JsonValue.readHjson(result).toString(), values);
                }
            }
        } catch (final Exception e) {
            LoggingUtils.error(LOGGER, e);
        } finally {
            HttpUtils.close(response);
        }
        return List.of();
    }
This is {@link RestAuditTrailManager}.

@author Misagh Moayyed
@since 5.3.0
support/cas-server-support-audit-rest/src/main/java/org/apereo/cas/audit/RestAuditTrailManager.java