Growth metric time series (roas etc.)
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Required.
Required.
Responses
Section titled “Responses”Metric series (dynamic shape). Reads the computed_metrics D1 table. metricName echoes the ?metric query param (defaults to “roas”). value column is REAL -> number. metadata is a JSON text column (text(..., {mode:"json"})) with NO schema constraint — it is whatever the metric writer stored; it is the metadata of the LAST row in the period, or null when there are no rows. trend[].date = periodStart.slice(0,10) i.e. “YYYY-MM-DD”. Missing startDate/endDate throws -> 500 {error, detail} (routes:102-110).
object
Echo of ?metric, default ‘roas’.
Last value in range; 0 when no rows.
Arithmetic mean of values; 0 when no rows.
object
Period_start truncated to YYYY-MM-DD
Opaque JSON from computed_metrics.metadata of the latest row in range; null when there are no rows. No schema is enforced anywhere in the read path — intentionally permissive.
Load failed / missing date params.
object
Examplegenerated
{ "error": "example", "detail": "example"}