POST /api/v1/exam/attempt/{attempt}/grade

Manually grade or re-grade a specific exam attempt. Useful for reviewing unstructured questions or overriding AI-generated scores.

Path parameters

  • attempt string Required

    UUID of the attempt to grade

Responses

  • 200 application/json

    Attempt graded 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
  • 403

    Forbidden - Admin or Lecturer role required

  • 404

    Attempt not found

POST /api/v1/exam/attempt/{attempt}/grade
curl \
 --request POST 'http://localhost:3500/api/v1/exam/attempt/attempt-123/grade'
Response examples (200)
{
  "message": "Attempt graded successfully",
  "gradedAt": "2025-11-20T14:30:00Z",
  "attemptId": "attempt-123",
  "totalScore": 88,
  "gradedQuestions": 10
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}