# tys.auditEvents.list()

> tys.auditEvents.list()

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

*Method* · `@tryyoursize/node`

```ts
list(params: AuditEventListParams = {}, options?: RequestOptions): PagePromise<AuditEventPage, AuditEvent>
```

## Parameters

- **`params`** (`AuditEventListParams`, optional, default `{}`): `action` (a trailing `.` matches a prefix), `actor`, `store_id`, `target`, `from`, `to`, `limit` (≤ 200), `cursor`.
- **`options`** (`RequestOptions`, optional)

## Returns

`PagePromise<AuditEventPage, AuditEvent>`: Audit events, newest first. Await it for one page (`{ data, has_more, next_cursor }`), or `for await` over every item. See [PagePromise](https://docs.tryyoursize.com/reference/node/page-promise.md).

## Example

**Node.js**

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

**Python**

```python
for event in tys.audit_events.list(action="api_key.").auto_paging_iter():
    print(event["created_at"], event["actor_type"], event["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

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