# Export your data to your own storage

> Canonical HTML: https://screenrig.ai/docs/data-export

On Enterprise, an organization takes its plays, playback totals, events, and audit log to storage and tools it owns: a daily export to an S3-compatible bucket, and up to three audit streams to Splunk, Datadog, or a bucket. An organization admin sets up each destination, and nothing is sent until an organization owner or admin approves it with a passkey.

## Daily export

One export per organization writes each finished UTC day to your bucket, at the hour and in the time zone you choose. The first run writes yesterday, and after an outage the export writes the days it missed, up to the latest seven. Each day holds four datasets:

| Dataset | Holds |
| --- | --- |
| `plays` | Every play start |
| `playback` | The day's proof-of-play totals |
| `events` | Each project's durable events, never the Player log |
| `audit` | Each project's audit log and the organization's own |

Everything goes under `<prefix>/screenrig/v1/` in your bucket as gzipped NDJSON, one file per project and dataset for each day, with `project_id` on every row:

| Object | Holds |
| --- | --- |
| `<dataset>/dt=YYYY-MM-DD/<project_id>.ndjson.gz` | One project's rows for the day |
| `audit/dt=YYYY-MM-DD/org.ndjson.gz` | The organization's own audit entries |
| `dt=YYYY-MM-DD/_manifest.json` | Written last: every file with its rows, compressed bytes, and SHA-256, the first and last sequence of each audit file, and the audit chain heads (scope, sequence, and hash) |

A day with a manifest is complete. A rerun overwrites the day's files and then the manifest, with identical bytes when the data is unchanged. An admin can queue any finished day of the last 30 days again to backfill it. A project removed from the organization leaves its older files in place and is absent from later manifests.

Each run is listed with its day, status, files, rows, bytes, and error for 90 days. A failed run tries again after 15 minutes, 1 hour, and 4 hours, then waits for the next start. The status is `queued`, `running`, `succeeded`, `partial`, `failed`, or `awaiting_approval`. An error names a class such as `destination_access_denied` or `destination_no_such_bucket`, never a key or your data.

The export reads what your project and organization admins can already read, and it adds no reader across organizations. The files carry email addresses, as the dashboard's own exports do. At most 20 GiB goes to one bucket in a UTC day.

## Audit streams

An organization can have up to three audit streams. Each tails the audit log of the organization and of every live project, in chain order, and each is one of:

- **Splunk.** A HEC receiver, sent in batches of events.
- **Datadog.** Logs sent to your Datadog account.
- **A bucket.** One gzipped NDJSON object an hour, under `audit-stream/<stream_id>/` in the same `screenrig/v1/` folder, named by the first and last sequence it holds.

A new stream starts at the log's current end, so it carries the log from the day it is created, and a project that joins later streams from its first entry. A Splunk or Datadog stream sends every 30 seconds. A failed delivery is tried again after 1, 5, 15, and then 60 minutes, and no entry is delivered twice.

## Approval

An organization owner or admin approves every destination with a passkey before anything is sent: the bucket, and each stream's receiver. Until then a run is `awaiting_approval`, a test is refused with `destination_unapproved`, and the destination shows as pending. A changed bucket, key, or receiver is a new destination and waits for its own approval; the old one is removed with its stored secret.

The bucket's access key and a receiver's token are stored sealed and are never shown again; only the last four characters of the key ID are. A test writes one small object, `_screenrig_test`, to the bucket, or sends one test event to a receiver.

## Withheld files and gaps

Before anything leaves, every file and entry is checked for tokens and credentials, and one that carries one is withheld and recorded rather than sent. Personal data and size are not checked.

- **Daily export.** The file is listed in the manifest with `withheld: true` and the rule that matched it, with no rows, bytes, or hash. The run is `partial` and names the file, the other files and the manifest are still written, and the next day carries on.
- **Audit stream.** The entry is skipped and recorded as a gap with its scope, its sequence range, and the reason. Entries around it are delivered. A stream shows its latest 20 gaps and counts them all. An entry too large for one delivery is a gap with the reason `entry_too_large`.

## Who can set it up

Only an organization admin sets up, changes, or removes the export or a stream, with a fresh passkey, password, or single sign-on confirmation. Agents, the CLI, and service clients have no route to them. Each change is recorded in the organization audit log without any secret.

Setting up or changing a destination is an Enterprise feature. An organization below Enterprise can always pause what it set up, and a downgrade changes nothing that is already running.

## Related

- [Audit log](https://screenrig.ai/docs/audit.md): what is recorded, the hash chain, and the CSV, XLSX, and PDF export on Premium and above.
- [Reports and exports](https://screenrig.ai/docs/reports.md): uptime and proof-of-play reports and the whole-project export.
- [Organization security controls](https://screenrig.ai/docs/permissions.md#organization-security-controls): an IP allowlist and passkey-only sign-in.
