审计事件 (auditevents
)
auditevents
端点提供有关应用程序审计事件的信息。
获取审计事件
要获取审计事件,向 /actuator/auditevents
发送 GET
请求,如下面的基于 curl 的示例所示:
$ curl 'http://localhost:8080/actuator/auditevents?principal=alice&after=2025-05-25T18%3A02%3A36.531435%2B08%3A00&type=logout' -i -X GET
前面的示例获取了在 2017 年 11 月 7 日 UTC 时区 09:37 之后发生的、主体为 alice
的 logout
事件。
响应结果类似于以下内容:
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 124
{
"events" : [ {
"timestamp" : "2025-05-25T10:02:36.531855Z",
"principal" : "alice",
"type" : "logout"
} ]
}