GET /api/v1/exam/{id}/attempts

Retrieve all student attempts for a specific exam. Only accessible by admins and lecturers. Returns detailed information about each attempt including scores and submission status.

Path parameters

  • id string Required

    UUID of the exam

Responses

  • 200 application/json

    List of exam attempts with student details and scores

  • 400 application/json

    Default bad request error 400 response

    Hide response attributes Show response attributes object
    • message string Required

      Response message

    • error string Required
    • statusCode number Required
  • 403

    Forbidden - Admin or Lecturer role required

  • 404

    Exam not found

GET /api/v1/exam/{id}/attempts
curl \
 --request GET 'http://localhost:3500/api/v1/exam/123e4567-e89b-12d3-a456-426614174000/attempts'
Response examples (200)
{
  "examId": "123e4567-e89b-12d3-a456-426614174000",
  "attempts": [
    {
      "id": "attempt-123",
      "status": "GRADED",
      "maxScore": 100,
      "startedAt": "2025-11-20T09:15:00Z",
      "studentId": "student-456",
      "totalScore": 85,
      "studentName": "John Doe",
      "submittedAt": "2025-11-20T10:45:00Z"
    }
  ],
  "totalAttempts": 25
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}