Skip to main content
GET
Get what organizations created and who worked on the platform in a window

Authorizations

Authorization
string
header
required

API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....

Query Parameters

organizationId
string

The organization to report on. Omitted reports on every organization, which only a caller that may read across organizations may ask.

Minimum string length: 1
from
string<date-time>
required

Start of the window, inclusive (ISO 8601).

to
string<date-time>
required

End of the window, exclusive (ISO 8601). At most 92 days after from, or 31 days when sources holds posthog or loki, else 400.

timeZone
string
default:UTC

IANA time zone, only echoed in window so a reader knows which local days from and to meant. It changes no count, flag or bound: send from and to as the local day bounds yourself.

Example:

"Europe/Madrid"

sources
string

Comma-separated sources: db (the application database), posthog (dashboard visits and recordings) and loki (API requests per client type). Default db, which every report reads. posthog and loki need organization.readUsageTelemetry, else 403.

Example:

"db,posthog,loki"

people
enum<string>
default:ids

How people are shown: names, ids or aggregate (no per-person list). The deployment can cap it lower; peopleDetail in the answer says what applied.

Available options:
aggregate,
ids,
names
format
enum<string>
default:json

json (default) answers the report. pdf answers { downloadUrl }, the report rendered to a PDF. both answers { report, downloadUrl }. A PDF waits for the report generator, so it takes longer.

Available options:
json,
pdf,
both

Response

The usage report (format=json), { downloadUrl } (pdf), or { report, downloadUrl } (both)

schemaVersion
enum<number>
required
Available options:
1
generatedAt
string<date-time>
required
window
object
required
scope
object
required
peopleDetail
enum<string>
required
Available options:
aggregate,
ids,
names
sources
object
required
organizations
object[]
required

The organization asked for, or every organization with external activity in the window (and every client), most active first, then those only the posthog or loki source saw, at most 1,000. Counts leave out soft-deleted rows, seed sessions, demo clones and rows staff created.

truncated
object
required
excluded
object

Only for the all scope.