Skip to content
Docs

    Get Audit Log

    GET/v1/audit_logs/{audit_log_id}

    Get an Audit Log entry

    Path ParametersExpand Collapse
    audit_log_id: string
    ReturnsExpand Collapse
    AuditLog object { id, action, actor, 7 more }

    Audit log entry.

    id: string

    Unique identifier for the audit log entry.

    action: string

    The action that was performed.

    actor: AuditLogActor { id, name, type }

    The entity that performed the action.

    id: string

    Unique identifier for the actor.

    name: string

    Display name of the actor.

    Type of actor.

    One of the following:
    "user"
    "api_key"
    client_ip: string

    Client IP address.

    created_at: string

    When the action occurred.

    formatdate-time
    method: string

    HTTP method of the request.

    path: string

    Request path.

    status_code: number

    HTTP status code of the response.

    user_agent: string

    User agent string.

    target: optional AuditLogTarget { id, type }

    The target resource of the action.

    id: string

    Unique identifier for the target resource.

    type: string

    Type of the target resource.

    Get Audit Log

    curl https://api.nirvanalabs.io/v1/audit_logs/$AUDIT_LOG_ID \
        -H "Authorization: Bearer $NIRVANA_LABS_API_KEY"
    {
      "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"
      }
    }