Reports
Save SQL reports, adjust their parameters and export charts or data.
Overview
A report stores a read-only SQL query over your community’s analytics views. It can include a chart and parameters, such as dates. Each run uses current data.
Reports let you repeat an analysis without rebuilding it. Ask your agent to create a report for a number, table or chart. Open saved reports from Reports. Pin frequently used reports to Home.
Every workspace starts with six default reports. Charts use Vega-Lite. Datum renders them on the server, so the app, exported PNGs and agents show the same chart.
Basics
Find a report
Open Reports. Search by name if required. Select Pinned only to limit the list to Home reports. Select a report to open it.
The list shows each report’s chart type, definition, creator and latest change time. Default reports show Datum default as their creator. Reports created with an API key show API key. The creator does not change when someone edits a report.
Run it with new parameters
Each parameter has a field above the chart. The field for a date parameter has the label Start date for $1 and End date (exclusive) for $2. Other fields have the labels Parameter 1, Parameter 2 and so on, from their placeholder in the SQL.
Enter the required values. Press Run report.
The result shows the run duration and returned row count.
Default reports start with empty date fields. Empty fields use the rolling window in the report’s description. Explicit dates, such as 2026-06-01, fix the start or end. Dates use UTC. The start date is inclusive; the end date is exclusive.
Reports whose chart colors a field, such as New vs returning or Retention, have a Chart colors menu: Distinct series, Light to dark or Two-sided scale. The chart redraws with those colors. Single-series charts have no menu. Every chart follows the app’s light or dark theme.
Read the exact numbers
Charts are images without hover labels. The table below each chart shows all returned rows, with 100 rows per page.
Open Values below a pinned Home chart to inspect its rows. See Home and pins.
Results stop at 10,000 rows. The report identifies truncated results. CSV exports contain those same rows.
Narrow the date range if you need a complete result.
Export a PNG or CSV
Press PNG to export an 800 by 450 image with the current theme and palette. Press CSV to export the rows.
PNG remains unavailable for reports without charts.
Edit or delete a report
Open the ··· menu. Choose Edit report. Change the name, Definition or parameter values as required. Press Save changes.
The definition describes what the report counts. Saved parameter values become the new defaults.
Open SQL below the table to inspect the query. Ask your agent to change the SQL or chart. Alternatively, use the CLI.
A query with a placeholder such as $1 needs a saved value for it in params. Save null to leave the field empty, so the SQL’s own fallback applies. For example, coalesce($1::timestamptz, now() - interval '90 days') with "params": {"1": null} uses the last 90 days until someone enters a date. Datum reads an empty string for a date parameter as null. This applies to a saved value and to a value given at run time.
The app does not edit SQL or chart definitions. Delete report removes the report from the list and Home. Datum retains its audit history.
Create a report
Create reports through your agent, the CLI or REST. The app has no report builder. Each interface validates SQL and charts before saving.
Include the report’s exclusions and time window in its definition. For example: “Not team · last 90 days · at least one contribution”.
Analytics with SQL explains the views, limits and query syntax.
From your terminal or agent
The agent, CLI and REST support the same report operations. Running a report requires read access. Creating, editing, pinning and deleting require write access.
ocmgr reports create 'Contributors by source' \
--sql 'select source, count(distinct member_id)::int as members from analytics.activity where not is_team and is_contribution group by source' \
--description 'Not team · all recorded history · at least one contribution' \
--chart '{"data":{"name":"rows"},"mark":"bar","encoding":{"x":{"field":"source","type":"nominal"},"y":{"field":"members","type":"quantitative"}}}' --json
ocmgr reports run <reportId> --param 1=2026-06-01 2=2026-09-01 --json
ocmgr reports run <reportId> --format png --theme dark --out contributors.png
ocmgr reports update <reportId> --pin
ocmgr reports delete <reportId>{ "name": "list_reports", "arguments": { "pinned": true } }
{ "name": "run_report", "arguments": { "id": "<reportId>", "format": "png", "theme": "light" } }curl -X POST "$OCMGR_URL/v1/reports/<reportId>/run" -H "Authorization: Bearer $OCMGR_API_KEY" \
-H 'content-type: application/json' -d '{"format":"csv"}'
curl "$OCMGR_URL/v1/reports/<reportId>.png" -H "Authorization: Bearer $OCMGR_API_KEY" -o report.png
curl "$OCMGR_URL/v1/reports/<reportId>.svg" -H "Authorization: Bearer $OCMGR_API_KEY" -o report.svgrun_report returns rows, CSV, SVG or PNG. With format: "png", MCP returns a PNG alongside its rows so your agent can display it. The default json format returns rows without an image.
--out creates a file that only you can read. It preserves existing files unless you add --force.
See create_report, update_report, run_report and delete_report for all parameters.
FAQ
Can a report show personal details like email addresses?
No. Analytics views exclude email addresses, profile URLs, handles, locations and message text. Display names remain empty unless your workspace includes personal data in events.
A chart failed to draw. What now?
Datum allows ten seconds and a fixed memory limit for each chart. Large results or chart expansion can exceed those limits.
Aggregate the query to return fewer rows. Run it again.
The app automatically retries when other charts occupy the server. For CLI or agent requests, wait briefly. Retry the request.
Can a chart load data from somewhere else?
No. A chart can use only its report’s rows. Datum rejects charts with external data, expressions or custom colours.
Who can change reports?
Anyone in the workspace can run, edit, pin or delete reports. See Team and roles.

