v1

latestOpenAPI 3.0.32026-07-26120117318.1 KB
Analytics

Get analytics insights

Returns AI-generated insights for the project over the last period days. Responses are cached on the upstream; pass force=true to regenerate. The insights[] array groups observations by type (critical, positive, tip, info) — each item has a short title, a longer body, and a suggested action.

get/analytics/insights

Query parameters

periodinteger

Look-back window in days. Must be between 1 and 365.

forceboolean

Bypass the server-side cache and regenerate insights. Expensive — avoid polling.

cached_onlyboolean

Return only already-cached results; never trigger a fresh generation. Use for fast UI reads.

environment0 | 1

Environment: 0 = sandbox, 1 = production.

Response

Insights payload.

object'analytics_insights' required
urlstring required
generated_atstring date-time nullable required

ISO 8601 timestamp of when the insights were generated.

period_daysinteger required

Window the insights cover, echoed from the period query param.

health'healthy' | 'watch' | 'critical' | 'null' nullable required

One-word project health label.

health_scoreinteger

Integer score — lower is worse.

summarystring required

One-paragraph plain-English synthesis.

is_cachedboolean

True when the payload came from the upstream cache.

is_staleboolean

True when a background refresh is in progress and the returned data is an older snapshot.

is_emptyboolean

True when the project has insufficient data to generate insights.