|
此版本仍在开发中,尚未视为稳定版。如需最新稳定版本,请使用 Spring Boot 4.0.4! |
审计事件(auditevents)
auditevents 端点提供有关应用程序审计事件的信息。
检索审计事件
要获取审计事件,请向 GET 发起一个 /actuator/auditevents 请求,如下列基于 curl 的示例所示:
$ curl 'http://localhost:8080/actuator/auditevents?principal=alice&after=2017-11-07T09%3A37Z&type=logout' -i -X GET
前面的示例检索了主体 logout 在 UTC 时区 2017 年 11 月 7 日 09:37 之后发生的 alice 事件。
返回的结果响应类似于以下内容:
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"
} ]
}