Worked stats samples
The endpoint list below documents every operation’s parameters; this overlay walks the carbon analytics read the way an ESG-conscious integration actually uses it: read the tenant’s carbon figure → export it for a ledger or a ToS-respecting disclosure. Success envelopes are{ data, meta }, error envelopes { error, meta } — see How to read a
worked sample. The carbon metric is
aggregated, not real-time — expect the poll cadence of a nightly rollup
when you poll from a dashboard.
Every response carries meta.request_id. Quote the request id when you
report a number that drifts from what the CSV shows or a window that
rounds differently than the dashboard read.
1. Read the carbon figure
GET /api/v1/stats/analytics/carbon returns your tenant’s platform-side
carbon metric for the analytics window. The response is a single
aggregate calculable off the same time-series the rest of the analytics
stack reads — a dashboard, a BI export, and this read all agree.
200
co2_kgis the computed carbon figure in kilograms of CO₂-equivalent.methodnames the derivation model so downstream reports document provenance.
2. Export the carbon figure
GET /api/v1/stats/analytics/carbon/export returns the same report in a
ledger-friendly export format (?format=csv). Use it for the annual
disclosure bundle or a regulator-side CSV handoff.
3. Errors
Errors follow the{ error, meta } envelope. The failure every exporter
hits:
422 — malformed export format. An unsupported format query value
never reaches the renderer:
422