GET /api/v1/unit-instance/{unit}/exams

Retrieve all exams for a unit instance. Returns exam metadata, scheduling, and status information.

Path parameters

  • unit string Required

    UUID of the unit instance (unit offering)

Query parameters

  • level string

    Access level filter (currently not implemented in service)

    Values are HIGH, NORMAL, or LOW.

Responses

  • 200 application/json

    Exams retrieved successfully

  • 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
  • 404

    Unit not found

GET /api/v1/unit-instance/{unit}/exams
curl \
 --request GET 'http://localhost:3500/api/v1/unit-instance/123e4567-e89b-12d3-a456-426614174000/exams'
Response examples (200)
{
  "exams": [
    {
      "id": "exam-987",
      "title": "Final Exam - Data Structures & Algorithms",
      "status": "SCHEDULED",
      "endTime": "2025-12-15T12:00:00Z",
      "duration": 180,
      "startTime": "2025-12-15T09:00:00Z",
      "totalMarks": 100,
      "attemptsTaken": 0,
      "attemptsAllowed": 1
    },
    {
      "id": "exam-988",
      "title": "Midterm Exam - Algorithms",
      "status": "SCHEDULED",
      "endTime": "2025-11-28T16:00:00Z",
      "duration": 120,
      "startTime": "2025-11-28T14:00:00Z",
      "totalMarks": 60,
      "attemptsTaken": 0,
      "attemptsAllowed": 1
    }
  ],
  "unitId": "123e4567-e89b-12d3-a456-426614174000",
  "totalExams": 2
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}