Grade all submitted assignment submissions (lecturer/admin)

POST /api/v1/assignment/{id}/grade-all

Batch grade all pending submissions for an assignment using AI analysis where applicable.

Path parameters

  • id string Required

    UUID of the assignment

Responses

  • 200 application/json

    All submissions 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

    Assignment not found

POST /api/v1/assignment/{id}/grade-all
curl \
 --request POST 'http://localhost:3500/api/v1/assignment/assignment-123/grade-all'
Response examples (200)
{
  "message": "All submissions graded",
  "results": {
    "failed": 1,
    "successful": 14,
    "alreadyGraded": 30
  },
  "totalGraded": 15,
  "averageScore": 78.5
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}