Skip to main content
POST
Run a read-only analytics query for a project

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Replo-Api-Version
enum<string>
required

The public API version to use for this request.

Available options:
2026-09-08

Query Parameters

projectId
string<uuid>
required

Body

application/json
query
string
required

Run a read-only analytics query for a project.

Rules:

  • Use SELECT or WITH queries only.
  • Do not add project or namespace filters; project scoping is enforced server-side.
  • Use session_attribution(since, until) for cross-project session and attributed revenue; stored computed metrics and page rollups are project-local.
  • Session revenue repeats across visited pages: deduplicate by subject for totals. Attributed revenue splits credit across eligible pageviews before domain filters.
  • Aggregate-state rollup columns must use the matching ClickHouse merge function, such as countMerge, uniqMerge, or sumMerge, and queries must group by selected dimensions.
  • Maximum execution time: 60 seconds.
  • Maximum result rows: 100000.

Queryable tables: Parameterized view: session_attribution(since='YYYY-MM-DD', until='YYYY-MM-DD'), inclusive UTC dates. Computes USD purchase, session, and equal-pageview attributed revenue across authorized sibling projects within that window, before domain filters. Cart/checkout views receive no attribution. Deduplicate sessionRevenueUsd by subject before summing. Inherits source row policies. Project scoped: yes.

Raw events with project-local computed session metrics. Use session_attribution for revenue across linked projects. Project scoped: yes.

Currency exchange rates for multi-currency reporting. Project scoped: no.

Pre-aggregated daily page metrics by day, domain, path, and UTM source. Revenue/conversion attribution is project-local; use session_attribution across linked projects. Project scoped: yes.

Pre-aggregated daily project traffic metrics by day and UTM source. Project scoped: yes.

Pre-aggregated daily purchase metrics by day and UTM source. Project scoped: yes.

Minimum string length: 1

Response

Run a read-only analytics query for a project

rowCount
integer
required
data
object[]
required