審計事件 (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"
} ]
}