Skip to content

Search is only available in production builds. Try building and previewing the site to test it out locally.

Insights Endpoints

Insights endpoints provide generated reports and session analysis.

Get the latest insights report.

GET /v1/insights/report?scope=personal
Authorization: Bearer gck_your_key
ParameterTypeDefaultDescription
scopestringpersonalReport scope
fromISO8601Start time
toISO8601End time

Returns the most recent generated report as a JSON payload.

Generate a new insights report on demand. Runs synchronously and returns the full report payload in the response — there is no job ID.

POST /v1/insights/report/generate?scope=personal
Authorization: Bearer gck_your_key
Accept-Language: en
ParameterTypeDefaultDescription
scopestringpersonalReport scope tag (see note below)
fromISO8601Start time
toISO8601End time

The Accept-Language header (default en) selects the report’s output language.

Note on scope: The engine treats scope as an arbitrary tag persisted alongside the report row. It isn’t validated against a fixed enum; personal is the common default. Use whatever grouping tags your dashboard expects.

Fetch the most recent in-progress report (if any) for the org so the dashboard can resume polling across page reloads.

GET /v1/insights/report/pending
Authorization: Bearer gck_your_key

Returns the pending report record, or 204 No Content if none is running.

Status of a running generation — used with /generate calls that the client polls rather than blocks on.

GET /v1/insights/report/status/abc123
Authorization: Bearer gck_your_key

Cancel an in-progress generation. Idempotent; returns the final status.

POST /v1/insights/report/cancel/abc123
Authorization: Bearer gck_your_key

Delete a previously generated report.

DELETE /v1/insights/report/abc123
Authorization: Bearer gck_your_key

Get report generation history.

GET /v1/insights/report/history?scope=personal&limit=20
Authorization: Bearer gck_your_key
ParameterTypeDefaultDescription
scopestringpersonalReport scope
limitinteger20Max records

Get a specific report by ID.

GET /v1/insights/report/abc123
Authorization: Bearer gck_your_key

Session type statistics for a time range.

GET /v1/insights/sessions/stats?from=2024-01-01T00:00:00Z&to=2024-01-31T00:00:00Z
Authorization: Bearer gck_your_key
ParameterTypeDefaultDescription
fromISO860130 days agoStart time
toISO8601nowEnd time

Session highlights — notable sessions based on scoring, patterns, or anomalies.

GET /v1/insights/sessions/highlights?from=2024-01-01T00:00:00Z&to=2024-01-31T00:00:00Z
Authorization: Bearer gck_your_key
ParameterTypeDefaultDescription
fromISO860130 days agoStart time
toISO8601nowEnd time

Response: a SessionHighlights object (returned directly, not wrapped).

Fetch the stored summary for a single session.

GET /v1/insights/sessions/summary?session_id=abc123
Authorization: Bearer gck_your_key
ParameterTypeRequiredDescription
session_idstringyesSession to fetch the summary for

Returns 400 Bad Request if no summary exists for the session.

List session summaries for the org, optionally filtered by developer.

GET /v1/insights/sessions/summaries?from=2024-01-01T00:00:00Z&limit=50
Authorization: Bearer gck_your_key
ParameterTypeDefaultDescription
fromISO860130 days agoStart time
toISO8601nowEnd time
user_idUUIDFilter to a single developer
limitinteger50Max records
offsetinteger0Pagination offset

Response: { "summaries": [...] }.

Fetch detailed session data (turn-level metrics, tool activity, scores) for a single session.

GET /v1/insights/sessions/details?session_id=abc123
Authorization: Bearer gck_your_key
ParameterTypeRequiredDescription
session_idstringyesSession to fetch details for
  • /report/history{ "reports": [...] }
  • /sessions/stats{ "stats": [...] }
  • /sessions/summaries{ "summaries": [...] }
  • /sessions/highlightsSessionHighlights (unwrapped)
  • /report and /report/:id → the generated report JSON (unwrapped)