# getAuditLog

Reads audit records as an array, optionally filtered by type, sequence, or time. Returns an empty array when recording is disabled.

Canonical: https://grid.syidax.com/docs/methods/getAuditLog/

<a id="meaning"></a>

## What does this API do?

Reads audit records as an array, optionally filtered by type, sequence, or time. Returns an empty array when recording is disabled.

<a id="contract"></a>

## Exact input and result types

```typescript
getAuditLog(filter?: AuditLogFilter): Promise<AuditEntry[]>
```

| Arguments | Required | Type |
| --- | --- | --- |
| filter | Optional | AuditLogFilter |

The return type is `Promise<AuditEntry[]>`.

<a id="usage"></a>

## Usage flow

After registering and initializing the Grid element, call grid.getAuditLog(…). Read the return value with await. For methods returning a boolean or report, inspect the result before continuing.

<a id="types"></a>

## Read related types

- [AuditLogFilter](https://grid.syidax.com/docs/types/AuditLogFilter.md)
- [AuditEntry](https://grid.syidax.com/docs/types/AuditEntry.md)

<a id="recipes"></a>

## Feature explanations and examples

- [View change history](https://grid.syidax.com/docs/features/audit-log.md) — The audit log tracks row, cell, and selection changes and undo/redo transitions. Use it to inspect change history that current values alone cannot reveal.
