PATCH /api/v1/assignment/{id}

Update assignment information such as title, description, deadline, or grading criteria. Only admins and lecturers can update assignments.

Path parameters

  • id string Required

    UUID of the assignment to update

application/json

Body Required

Updated assignment data (partial update supported)

  • title string
  • description string
  • marks number
  • status string
  • releaseDate string(date-time)
  • dueDate string(date-time)
  • maxAttempts number

Responses

  • 200 application/json

    Assignment updated successfully

  • 400

    Invalid assignment data

  • 403

    Forbidden - Admin or Lecturer role required

  • 404

    Assignment not found

PATCH /api/v1/assignment/{id}
curl \
 --request PATCH 'https://api.echoplain.social/api/v1/assignment/assignment-123' \
 --header "Content-Type: application/json" \
 --data '{"dueDate":"2025-12-05T23:59:59Z","allowLateSubmission":true}'
Request examples
{
  "dueDate": "2025-12-05T23:59:59Z",
  "allowLateSubmission": true
}
{
  "maxScore": 120,
  "passingScore": 60
}
Response examples (200)
{
  "message": "Assignment updated successfully",
  "assignment": {
    "id": "assignment-123",
    "title": "Algorithm Implementation Assignment",
    "dueDate": "2025-12-05T23:59:59Z",
    "maxScore": 120,
    "updatedAt": "2025-11-17T13:00:00Z"
  }
}