# `tartan audit`

_For tartan 0.9.36._

## `tartan audit export`

the org's audit rows for a time range, oldest first, to check offline (the CLI: --out &lt;file> writes them with a manifest; tartan audit verify --file checks it). Audit is kept 365 days, then deleted automatically.

```
tartan audit export --org <string>
```

**Role:** admin · **Writes:** no · **Steps up:** never

| Flag | Type | Required | What |
|---|---|---|---|
| `--org` | string | yes | org handle or id |
| `--since` | string | no | RFC 3339, inclusive |
| `--until` | string | no | RFC 3339, exclusive |
| `--after` | int | no | row id: the page after it |
| `--limit` | int | no | default 1000, max 1000 |

## `tartan audit query`

audit rows, newest first (with after: oldest first from that row id). Audit is kept 365 days, then deleted automatically.

```
tartan audit query --org <string>
```

**Role:** admin · **Writes:** no · **Steps up:** never

| Flag | Type | Required | What |
|---|---|---|---|
| `--org` | string | yes | org handle or id |
| `--actor` | string | no | exactly, e.g. user:&lt;id> |
| `--verb` | string | no | a verb or its prefix (device = device.*) |
| `--since` | string | no | RFC 3339, inclusive |
| `--until` | string | no | RFC 3339, exclusive |
| `--after` | int | no | row id: page forward, oldest first |
| `--before` | int | no | row id: page back, newest first |
| `--limit` | int | no | default 100, max 1000 |

## `tartan audit span`

control's own count, ends and anchored heads for an audit time range (what an export of it must match). Audit is kept 365 days, then deleted automatically.

```
tartan audit span --org <string>
```

**Role:** admin · **Writes:** no · **Steps up:** never

| Flag | Type | Required | What |
|---|---|---|---|
| `--org` | string | yes | org handle or id |
| `--since` | string | no | RFC 3339, inclusive |
| `--until` | string | no | RFC 3339, exclusive |

## `tartan audit verify`

re-check the org's audit hash chain (an export file: tartan audit verify --file, offline). Audit is kept 365 days, then deleted automatically.

```
tartan audit verify --org <string>
```

**Role:** admin · **Writes:** no · **Steps up:** never

| Flag | Type | Required | What |
|---|---|---|---|
| `--org` | string | yes | org handle or id |
