Skip to main content

Get a practice session detail including all submitted answers

GET 

/sessions/:session_id

Returns the full session payload: metadata + all submitted answers in chronological order. Used by the practice player to render post-completion review and to restore in-progress state on return visits (the start endpoint also returns the same data on resume, so this endpoint exists primarily for the post-complete results view).

Response shape vs sibling sessions endpoints:

  • Like PracticeSessionResponse (POST /quizzes/{id}/sessions): includes id, quiz_id, started_at, completed_at, total_questions, correct_answers, answers.
  • Like CompletedSessionResponse (POST /sessions/{id}/complete): includes a server-computed score_percentage.
  • Unique to this endpoint: score_percentage is nullable (null while the session is in-progress; set once the user calls complete).

Authorization: session-owner only (403 otherwise). 404 for missing sessions.

Historical preservation: a session whose parent quiz or study guide has been soft-deleted is STILL returned -- sessions are append-only history that survives parent deletion. This is opposite to the read endpoints on the quizzes surface (which 404 on a deleted parent) because sessions have a different lifecycle: once finalised, they belong to the user, not the quiz.

Answers with question_id: null (the underlying quiz question was hard-deleted via ON DELETE SET NULL after the answer was submitted) are INCLUDED in the response, not filtered. The frontend should render those as orphaned answer rows rather than silently dropping them.

Request

Responses

Session detail with all submitted answers.