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

# auditLogs

> The control-plane trail — client.auditLogs.

One method. The trail is read-only by construction: it only grows. API detail: [Audit logs](/docs/api/audit-logs).

## list

```ts theme={"system"}
client.auditLogs.list(query?: AuditFilter): Promise<Page<AuditEntry>>
```

`GET /v1/audit_logs`. `AuditFilter` extends the [page query](/docs/sdk/pagination) with:

<ResponseField name="actor" type="string">A principal id — a member `usr_…` or a key `key_…`.</ResponseField>
<ResponseField name="resource" type="string">A resource id, e.g. one `agt_…`.</ResponseField>
<ResponseField name="action" type="string">An action name, e.g. `member.role_changed`.</ResponseField>
<ResponseField name="from" type="string">Start of the time range (ISO 8601).</ResponseField>
<ResponseField name="to" type="string">End of the time range.</ResponseField>

```ts theme={"system"}
const trail = await client.auditLogs.list({ resource: agent.id, limit: 50 });
```
