Get Audit Log
client.auditLogs.get(stringauditLogID, RequestOptionsoptions?): AuditLog { id, action, actor, 7 more }
GET/v1/audit_logs/{audit_log_id}
Get Audit Log
import NirvanaLabs from '@nirvana-labs/nirvana';
const client = new NirvanaLabs({
apiKey: process.env['NIRVANA_LABS_API_KEY'], // This is the default and can be omitted
});
const auditLog = await client.auditLogs.get('audit_log_id');
console.log(auditLog.id);{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action": "vm.created",
"actor": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Alice Smith",
"type": "user"
},
"client_ip": "203.0.113.1",
"created_at": "2025-01-01T00:00:00Z",
"method": "GET",
"path": "/v1/compute/vms",
"status_code": 200,
"user_agent": "Mozilla/5.0",
"target": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "vm"
}
}Returns Examples
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action": "vm.created",
"actor": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Alice Smith",
"type": "user"
},
"client_ip": "203.0.113.1",
"created_at": "2025-01-01T00:00:00Z",
"method": "GET",
"path": "/v1/compute/vms",
"status_code": 200,
"user_agent": "Mozilla/5.0",
"target": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"type": "vm"
}
}