GetAuditLog
client.Events.Get(ctx, body) (*EventGetResponse, error)
POST/gitpod.v1.EventService/GetAuditLog
Gets one audit-log entry, including any typed details stored for it.
Use this method to:
- Inspect the details of a specific audit-log entry
- Retrieve the evidence associated with a Veto Exec audit event
Examples
-
Get an audit-log entry:
auditLogEntryId: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
GetAuditLog
package main
import (
"context"
"fmt"
"github.com/gitpod-io/gitpod-sdk-go"
"github.com/gitpod-io/gitpod-sdk-go/option"
)
func main() {
client := gitpod.NewClient(
option.WithBearerToken("My Bearer Token"),
)
event, err := client.Events.Get(context.TODO(), gitpod.EventGetParams{
AuditLogEntryID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", event.Entry)
}
{
"entry": {
"id": "id",
"action": "action",
"actorId": "actorId",
"actorPrincipal": "PRINCIPAL_UNSPECIFIED",
"createdAt": "2019-12-27T18:11:19.117Z",
"kind": "AUDIT_LOG_ENTRY_KIND_UNSPECIFIED",
"subjectId": "subjectId",
"subjectType": "RESOURCE_TYPE_UNSPECIFIED"
},
"details": {
"vetoExec": {
"process": {
"cmdline": "cmdline",
"name": "name",
"pgid": 0,
"pid": 0,
"ppid": 0,
"sid": 0,
"startedAt": "2019-12-27T18:11:19.117Z",
"tid": 0
},
"timestamp": "2019-12-27T18:11:19.117Z",
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"executable": "executable",
"filename": "filename"
}
}
}Returns Examples
{
"entry": {
"id": "id",
"action": "action",
"actorId": "actorId",
"actorPrincipal": "PRINCIPAL_UNSPECIFIED",
"createdAt": "2019-12-27T18:11:19.117Z",
"kind": "AUDIT_LOG_ENTRY_KIND_UNSPECIFIED",
"subjectId": "subjectId",
"subjectType": "RESOURCE_TYPE_UNSPECIFIED"
},
"details": {
"vetoExec": {
"process": {
"cmdline": "cmdline",
"name": "name",
"pgid": 0,
"pid": 0,
"ppid": 0,
"sid": 0,
"startedAt": "2019-12-27T18:11:19.117Z",
"tid": 0
},
"timestamp": "2019-12-27T18:11:19.117Z",
"action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED",
"environmentId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"executable": "executable",
"filename": "filename"
}
}
}