GetAuditLog
client.events.retrieve(EventRetrieveParams { auditLogEntryId } body, RequestOptionsoptions?): EventRetrieveResponse { entry, details }
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
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const event = await client.events.retrieve({
auditLogEntryId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
});
console.log(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"
}
}
}