﻿<head><script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-4357510538660394"
     crossorigin="anonymous"></script></head># Reports and exports

> Canonical HTML: https://screenrig.ai/docs/reports

Reports read the project's aggregates—uptime rollups, alert history, screen state, and direct campaign delivery—without scanning raw events. Every report is a single table available as JSON, CSV, XLSX, or PDF, and rollups, alert history, and proof of play can be emailed automatically on a schedule. Reports are a Plus feature (see [pricing](https://screenrig.ai/pricing.md)), except the `fleet_health` rollup in JSON format, which is available on every plan.

## Folder and tag rollups

`fleet_health`, `uptime`, `publishing`, and `alerts` aggregate your fleet by folder, screen, or tag across inclusive UTC calendar days. Each folder row includes every screen inside that folder and all nested subfolders, with the first row summarizing the entire project. When grouped by tag, a screen is counted under every tag it carries.

| Report | What each row includes |
| --- | --- |
| `fleet_health` | Total screens, currently online count, availability, open alerts, alerts opened in the period, hot, display disconnected, and crashing screens, and screens running their current content |
| `uptime` | Online and offline hours, availability percentage, and recorded coverage |
| `publishing` | Screens with current content, updating content, content needing attention, or no content |
| `alerts` | Currently open alerts and alerts opened during the period, broken down by condition |
| `alert_log` | One row per alert opened in the period: screen, condition, start and end times, and who acknowledged it |
| `proof_of_play` | Completed plays for a sponsor's or advertiser's direct campaigns, broken down by campaign, media file, and screen, with totals |

### Querying reports

- List available report types and their supported filters with `GET /api/reports` (`screenrig reports list`).
- Run a report with `GET /api/reports/{kind}` or `screenrig reports show KIND` using the filter flags: `--from`, `--to`, `--group-by`, `--folder-id`, `--direct`, `--tag`, `--campaign-id`, and `--advertiser`.
- **Date range (`from`, `to`):** Inclusive UTC dates. Defaults to the last 30 days, at most 366 days apart.
- **Grouping (`group_by`):** `folder` (default), `screen`, or `tag`. Folder rows include `id`, `parent_id`, and `depth` so clients can render the hierarchy.
- **Scoping (`folder_id`, `direct`, `tag`):** `folder_id` restricts the report to a folder and its entire subtree. Add `direct=true` to include only that folder and its immediate child folders (or, when grouped by screen, only screens directly inside that folder). `tag` filters to screens carrying that tag.
- **Metrics:** Availability is online time divided by recorded time; recorded coverage shows what share of the period screens actively reported state.

In the dashboard, open **Logs → Screen health** to browse rollups as a folder tree—expand any folder to inspect its subfolders and screens, or click a screen to open its **Health** tab. Open **Logs → Screen reports** to run any report with the same filters and download it as CSV, Excel, or PDF.

## CSV, XLSX, and PDF

Every report endpoint accepts `format=csv`, `format=xlsx`, or `format=pdf` and returns a downloadable attachment with the same rows. This applies to the aggregate reports above as well as `GET /api/uptime/daily`, `GET /api/screens/{id}/uptime`, `GET /api/screens/{id}/health/history`, `GET /api/health/trend`, `GET /api/alerts`, `GET /api/playback`, `GET /api/playback/plays`, `GET /api/playback/totals`, `GET /api/playback/completeness`, advertising delivery, fill, and spend reports, and direct campaign reports. Paginated reports export in full up to 50,000 rows (`truncated` indicates when additional rows were omitted).

- **XLSX:** Single worksheet with the report title and period above a frozen header row, numeric cells typed as numbers, and bold totals.
- **PDF:** Ready-to-send statement featuring the screenRIG name, project name, report title and period, a table with repeating headers across pages, totals, and page numbers.
- **CSV:** Column header row followed by data rows, with formula-injection protection on text cells.

```sh
screenrig reports show fleet_health --group-by folder --format pdf --output fleet-health.pdf
screenrig reports show proof_of_play --advertiser "Acme Corp" --from 2026-10-01 --to 2026-10-31 --format pdf --output acme.pdf
screenrig project uptime --format xlsx --output uptime.xlsx
screenrig alerts list --state all --format csv --output alerts.csv
```

## Proof of play for sponsors and advertisers

`proof_of_play` totals completed plays for your project's direct campaigns. A play counts when the screen reports that the media finished playing on glass. Filter to a single campaign with `campaign_id`, or to every campaign for a sponsor or advertiser with `advertiser` (exact name, case-insensitive). Each row represents a campaign, media file, and screen, reporting total plays, hours played, first and last play dates, and estimated impressions (when the screen has an audience estimate configured). Export as PDF for a client-ready statement.

## Email schedules

A report subscription defines a report type, its filters, a delivery schedule, a file format, and the project members who receive it. Create subscriptions via `POST /api/report-subscriptions` or the CLI; an organization can have up to 50 subscriptions across all of its projects (`report_subscription_limit_reached`).

| Field | Description |
| --- | --- |
| `name` | Subscription name (1 to 100 characters) |
| `kind` | `fleet_health`, `uptime`, `publishing`, `alerts`, `alert_log`, or `proof_of_play` |
| `filters` | Report filters excluding the date range: `group_by`, `folder_id`, `direct`, `tag`, `campaign_id`, `advertiser` |
| `schedule` | `cadence` (`daily`, `weekly` with `weekday` defaulting to `monday`, or `monthly` with `day_of_month` 1–28 defaulting to `1`), `hour` (`0`–`23`), and an IANA `timezone` (default `UTC`) |
| `format` | Attachment format: `pdf`, `xlsx`, or `csv` |
| `recipients` | Up to 25 project members, specified by `user_id`, member email address, or `owner` |
| `enabled` | `true` (default) to run on schedule, or `false` to pause |

**Delivery behavior:**

- Each scheduled send covers the preceding period in UTC calendar days calculated in the schedule's time zone: the previous day for daily runs, the previous 7 days for weekly runs, and the full previous month for monthly runs.
- Recipients must be project members and are re-verified on every send. Non-members are rejected when creating or updating a subscription, and members who leave the project or have unverified email addresses stop receiving deliveries. Attachments are capped at 8 MiB.
- Failed sends retry after 15 minutes, 1 hour, and 4 hours before waiting for the next scheduled run. Each subscription tracks `last_status` (`delivered` or `failed`), `last_error`, the date range covered by the last run, and `next_run_at`.
- `POST /api/report-subscriptions/{id}/send` triggers an immediate send for the period a run right now would cover, without shifting the regular schedule, and returns both the subscription and the delivery outcome.

```sh
screenrig reports subscriptions create --name "Monday fleet health" --kind fleet_health \
  --cadence weekly --weekday monday --hour 7 --timezone America/Los_Angeles \
  --format pdf --recipients ann@example.com,usr_ID
screenrig reports subscriptions list
screenrig reports subscriptions send rsub_ID
screenrig reports subscriptions update rsub_ID --pause
```

Pass `--filter NAME=VALUE` (repeatable) to set report filters such as `group_by=screen`. Use `update` to edit settings, `--pause` and `--resume` to toggle delivery, `show` to inspect a subscription, and `delete` to remove one. A subscription's report `kind` is fixed—create a new subscription to schedule a different report type.

In the dashboard, manage scheduled deliveries under **Screen reports → Email schedules**, including **Send now**, **Pause**, and **Resume**.

## Export a whole project

`screenrig project export DIR` writes your project's data to a local directory in open formats. Check each section's status before relying on an export for recovery: `data.complete` is `false` if any section failed, and sections inaccessible to your credentials or plan are marked as skipped.

| Path | Contents |
| --- | --- |
| `export.json` | Export format (`screenrig.export/v1`), timestamp, per-section outcomes, and a manifest of every file with its byte size and SHA-256 hash |
| `project.json`, `tags.json` | Project metadata and tags with their assigned screens |
| `screens/` | `screens.json`, `folders.json`, and `schedules.json` (each screen's schedule levels, takeover, and display schedule) |
| `playlists/` | Every playlist and all of its revisions as JSON |
| `campaigns.json`, `advertising/direct-campaigns.json` | Campaigns and direct advertising campaigns |
| `cards/`, `sources.json`, `applications.json`, `triggers.json` | Cards and their data, data source configurations, application metadata, and alert triggers |
| `applications/APP_ID/kv.json` | Each application's persistent key/value entries: base64 values, content types, byte counts, SHA-256 hashes, and revisions |
| `notifications.json`, `webhooks.json`, `alert-mutes.json`, `report-subscriptions.json` | Notifications, webhooks, alert mutes, and report schedules |
| `media/files/`, `media/manifest.json`, `media/media.json`, `media/folders.json` | Original media files, per-file manifest (ID, name, type, size, SHA-256), media records, and media folders |
| `data/` | CSV exports for plays, plays by day/screen/media, daily uptime, uptime by screen, and alerts |
| `log/events.jsonl` | Project event log (one JSON event per line) |
| `log/audit.jsonl`, `log/audit-head.json` | The [audit log](https://screenrig.ai/docs/audit.md) (one JSON entry per line) and its chain head |

**Export behavior and options:**

- **Application archives:** Keep your original application release archives alongside project exports for release recovery, including older playlist pins. Omitted application content appears in the application files section and set `data.complete: false` with `export_application_content_omitted` (including when `--no-media` is used). Rerunning the export refreshes metadata.
- **Application K/V:** Persistent key/value data is exported in full even when `--no-media` or `--since` is set. If listing or reading a K/V value fails, the applications section fails with `export_section_failed` and sets `data.complete: false`; resolve the read error and rerun.
- **Excluded credentials:** Secrets are never exported. Webhook signing secrets and receiver addresses, notification chat or pager credentials, and data source secrets are omitted (the export retains receiver origins and secret key names).
- **Safe reruns and filters:** Rerunning `project export` against the same directory is safe: JSON files are rewritten in full, complete media files are kept, partial downloads resume automatically, and each media file is checked against the SHA-256 the project holds before it is kept. Use `--no-media` to skip downloading media files and `--since DAY` to start CSV data, event logs, and audit logs from a specific date. Every export request counts as a billed API request, and media downloads count toward egress.
