# tys.audit_events.list()

> The audit log of the key's organization, newest first.

Source: https://docs.tryyoursize.com/reference/python/audit-events-list/

*Method* · `tryyoursize`

The audit log of the key's organization, newest first. Scope `audit:read`.

Filters: `action` (a trailing `.` matches a prefix), `actor` (`actor_type:actor_id`), `store_id`, `target`, `from_` (or `**{"from": ...}`), `to` (`datetime` or RFC 3339 string), `limit` (≤ 200), `cursor`.

```python
def list(**filters: Any) -> ListPage
```

## Parameters

- **`**filters`** (`Any`, required): `action` (a trailing `.` matches a prefix), `actor` (`actor_type:actor_id`), `store_id`, `target`, `from_` and `to` (datetime or RFC 3339), `limit` (≤ 200), `cursor`. Unknown filters raise `TypeError`.

## Returns

`ListPage`: Audit events, newest first. A dict with `data`, `has_more`, `next_cursor`; `next_page()` and `auto_paging_iter()` walk the rest. See [ListPage](https://docs.tryyoursize.com/reference/python/list-page.md).

## Example

**Python**

```python
for event in tys.audit_events.list(action="api_key.").auto_paging_iter():
    print(event["created_at"], event["actor_type"], event["action"])
```

**Node.js**

```ts
for await (const e of tys.auditEvents.list({ action: "api_key." })) {
  console.log(e.created_at, e.actor_type, e.action);
}
```

**cURL**

```bash
curl "https://api.tryyoursize.com/v1/audit_events?action=api_key." \
  -H "Authorization: Bearer $TRYYOURSIZE_RESTRICTED_KEY" \
  -H "TYS-Version: 2026-10-25"
```

## See also

- [audit_events.list (HTTP API)](https://docs.tryyoursize.com/api/reference/operations/listauditeventswithkey.md)
