This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Boot 3.3.4!spring-doc.cn

The auditevents endpoint provides information about the application’s audit events.spring-doc.cn

Retrieving Audit Events

To retrieve the audit events, make a GET request to /actuator/auditevents, as shown in the following curl-based example:spring-doc.cn

$ curl 'http://localhost:8080/actuator/auditevents?principal=alice&after=2024-10-03T19%3A30%3A03.317346084Z&type=logout' -i -X GET

The preceding example retrieves logout events for the principal, alice, that occurred after 09:37 on 7 November 2017 in the UTC timezone. The resulting response is similar to the following:spring-doc.cn

HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 127

{
  "events" : [ {
    "timestamp" : "2024-10-03T19:30:03.317879211Z",
    "principal" : "alice",
    "type" : "logout"
  } ]
}

Query Parameters

The endpoint uses query parameters to limit the events that it returns. The following table shows the supported query parameters:spring-doc.cn

Parameter Description

afterspring-doc.cn

Restricts the events to those that occurred after the given time. Optional.spring-doc.cn

principalspring-doc.cn

Restricts the events to those with the given principal. Optional.spring-doc.cn

typespring-doc.cn

Restricts the events to those with the given type. Optional.spring-doc.cn

Response Structure

The response contains details of all of the audit events that matched the query. The following table describes the structure of the response:spring-doc.cn

Path Type Description

eventsspring-doc.cn

Arrayspring-doc.cn

An array of audit events.spring-doc.cn

events.[].timestampspring-doc.cn

Stringspring-doc.cn

The timestamp of when the event occurred.spring-doc.cn

events.[].principalspring-doc.cn

Stringspring-doc.cn

The principal that triggered the event.spring-doc.cn

events.[].typespring-doc.cn

Stringspring-doc.cn

The type of the event.spring-doc.cn

Parameter Description

afterspring-doc.cn

Restricts the events to those that occurred after the given time. Optional.spring-doc.cn

principalspring-doc.cn

Restricts the events to those with the given principal. Optional.spring-doc.cn

typespring-doc.cn

Restricts the events to those with the given type. Optional.spring-doc.cn

Path Type Description

eventsspring-doc.cn

Arrayspring-doc.cn

An array of audit events.spring-doc.cn

events.[].timestampspring-doc.cn

Stringspring-doc.cn

The timestamp of when the event occurred.spring-doc.cn

events.[].principalspring-doc.cn

Stringspring-doc.cn

The principal that triggered the event.spring-doc.cn

events.[].typespring-doc.cn

Stringspring-doc.cn

The type of the event.spring-doc.cn