provider 2506 operations 141 docs pages
@utdk/posthog
PostHog API
Generated UTDK provider client for PostHog API. Generated UTDK provider types and OpenAPI-backed client for https://us.posthog.com/api/schema/.
Single Session Summaries
Optional generated docs page for
@utdk/posthog.
Single Session Summaries
Operations
posthog.singleSessionSummariesList
- HTTP:
GET /api/projects/{project_id}/single_session_summaries/ - What it does: List stored AI-generated session summaries for the team, one row per session (latest summary kept). Use to discover which sessions have been summarized and to filter for sessions with specific problems —
has_exceptions=true,outcome=failure, or a customsession_idsnarrowing. Returns lightweight rows without the full summary JSON; use the retrieve endpoint for the per-segment / per-action detail. - OpenAPI operationId:
single_session_summaries_list - Path params: None
- Query params:
created_by,date_from,date_to,distinct_id,has_exceptions,has_visual_confirmation,limit,offset,order,outcome,session_ids - Response codes:
200 - Transport options: None
- TypeScript: Client interface
Inputs
- Client input type:
{ [key: string]: unknown } - Client transport options: None
Outputs
- Client return type:
{ count: number; next?: string | null; previous?: string | null; results: ({ id: string; session_id: string; distinct_id: string | null; session_start_time: string | null; session_duration: number | null; session_outcom... - OpenAPI response codes:
200
import posthog from "@utdk/posthog";
type SingleSessionSummariesListInput = Parameters<typeof posthog.singleSessionSummariesList> extends [infer T, ...unknown[]] ? T : undefined;
type SingleSessionSummariesListOutput = Awaited<ReturnType<typeof posthog.singleSessionSummariesList>>;
const result: SingleSessionSummariesListOutput = await posthog.singleSessionSummariesList();
// Result shape (from schema): { count: number; next?: string | null; previous?: string | null; results: ({ id: string; session_id: string; distinct_id: string | null; session_start_time: string | null; session_duration: number | null; session_outcom...
posthog.singleSessionSummariesRetrieve
- HTTP:
GET /api/projects/{project_id}/single_session_summaries/{session_id}/ - What it does: Get the latest stored AI summary for a single session by
session_id. Returns the fullsummaryJSON (segments with named timeline, per-actionabandonment/confusion/exceptionflags, segment outcomes, headlinesession_outcome, optionalsentiment), theexception_event_idsarray, theextra_summary_context(e.g.focus_area) used at generation time, and therun_metadata(LLM model used, whether visual confirmation was applied). 404 if no summary has been generated for this session yet — to trigger generation, use the existingsession-recording-summarizeflow rather than this endpoint. - OpenAPI operationId:
single_session_summaries_retrieve - Path params:
session_id - Query params: None
- Response codes:
200 - Transport options: None
- TypeScript: Client interface
Inputs
- Client input type:
{ [key: string]: unknown } - Client transport options: None
Outputs
- Client return type:
{ id: string; session_id: string; distinct_id: string | null; session_start_time: string | null; session_duration: number | null; summary: { [key: string]: unknown }; exception_event_ids: (string)[]; extra_summary_conte... - OpenAPI response codes:
200
import posthog from "@utdk/posthog";
type SingleSessionSummariesRetrieveInput = Parameters<typeof posthog.singleSessionSummariesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
type SingleSessionSummariesRetrieveOutput = Awaited<ReturnType<typeof posthog.singleSessionSummariesRetrieve>>;
const result: SingleSessionSummariesRetrieveOutput = await posthog.singleSessionSummariesRetrieve();
// Result shape (from schema): { id: string; session_id: string; distinct_id: string | null; session_start_time: string | null; session_duration: number | null; summary: { [key: string]: unknown }; exception_event_ids: (string)[]; extra_summary_conte...