> ## Documentation Index
> Fetch the complete documentation index at: https://arize-ax.mintlify.site/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Audit Logs

> Retrieve Arize account audit log entries programmatically. Filter by user, operation type, and time window.

<Note>
  The `audit_logs` client methods are currently in **ALPHA**. The API may change without notice. A one-time warning is emitted on first use.
</Note>

Retrieve audit log entries for your account. The caller must be an account admin and the account must have audit logging enabled — otherwise the request returns a 403.

## Key Capabilities

* List audit log entries newest-first with cursor-based pagination
* Filter by time window (`start_time` / `end_time`)
* Filter by user (`user_id`)
* Filter by operation type (`QUERY`, `MUTATION`, or `SUBSCRIPTION`)

## List Audit Logs

List audit log entries with optional filtering. When `start_time` and `end_time` are omitted, the server defaults to the last 30 days.

```python theme={null}
from datetime import datetime, timedelta, timezone
from arize.audit_logs.types import AuditLogOperationType

resp = client.audit_logs.list(
    start_time=datetime.now(timezone.utc) - timedelta(days=7),   # optional
    end_time=datetime.now(timezone.utc),                          # optional
    user_id="your-user-id",                                       # optional
    operation_type=AuditLogOperationType.MUTATION,                # optional
    limit=50,
)

for entry in resp.logs:
    print(entry.id, entry.created_at, entry.operation_type)
```

For details on pagination, field introspection, and data conversion (to dict/JSON/DataFrame), see [Response Objects](/api-clients/python/version-8/overview#response-objects).

### Operation Types

| Value                                | Description                             |
| ------------------------------------ | --------------------------------------- |
| `AuditLogOperationType.QUERY`        | Read operations                         |
| `AuditLogOperationType.MUTATION`     | Write operations (create/update/delete) |
| `AuditLogOperationType.SUBSCRIPTION` | Real-time subscription operations       |
