审计事件 (auditevents)
auditevents 端点提供有关应用程序审计事件的信息。
检索审计事件
要检索审计事件,请向 /actuator/auditevents 发出 GET 请求,如以下基于 curl 的示例所示
$ curl 'https://:8080/actuator/auditevents?principal=alice&after=2017-11-07T09%3A37Z&type=logout' -i -X GET
前面的示例检索了在 UTC 时区中 2017 年 11 月 7 日 09:37 之后发生的,主体为 alice 的 logout 事件。结果响应类似于以下内容
HTTP/1.1 200 OK
Content-Type: application/vnd.spring-boot.actuator.v3+json
Content-Length: 117
{
"events" : [ {
"principal" : "alice",
"timestamp" : "2017-11-07T09:38:13Z",
"type" : "logout"
} ]
}