---
title: "Get Exercise Stats"
method: GET
path: "/teacher/assignments/{assignment_id}/exercises/{exercise_id}/stats"
tags: ["teacher_assignments"]
---

# Get Exercise Stats

`GET /teacher/assignments/{assignment_id}/exercises/{exercise_id}/stats`

## Request

- Base URL: `https://api.excellence-ai.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.excellence-ai.com/teacher/assignments/{assignment_id}/exercises/{exercise_id}/stats`
- Auth: OAuth 2 (password, token URL `api/login`)

Get statistics for a specific exercise in an assignment.
Returns chat message count and attempt statistics, on one class's
students when `class_id` is given (the Results page's class selector).

## Path parameters

- `assignment_id` string, required
- `exercise_id` string, required

## Query parameters

- `class_id` string, nullable

## Response `200`

Successful Response

- RoutersExerciseAssignmentsExerciseStatsResponse: Per-exercise statistics for teacher analytics.
  - `exercise_id` string, required
  - `total_chat_messages` integer
  - `students_who_used_chat` integer
  - `total_attempts` integer
  - `average_attempts` number
  - `students_who_attempted` integer

## Other responses

- `422`: Validation Error

## Changes

> 55 revisions in range; 1 not diffed.

- **2026-09-25** `a8ae0e0c0570`: 1 info
  - added the new optional `query` request parameter `class_id`

[Operation history](https://skmtc.dev/excellence-ai/apis/excellence-learning/changes/teacher/assignments/:assignment_id/exercises/:exercise_id/stats/get.md)

---

[API](https://skmtc.dev/excellence-ai/apis/excellence-learning.md) - [All operations](https://skmtc.dev/excellence-ai/apis/excellence-learning/llms.txt) - [OpenAPI document](https://skmtc.dev/excellence-ai/apis/excellence-learning/revisions/379e4a57dee8?raw)
