DELETE /api/v1/assignment/{id}/material/{materialId}

Delete a specific material from an assignment. Only admins and lecturers can remove materials.

Path parameters

  • id string Required

    UUID of the assignment

  • materialId string Required

    UUID of the material to remove

Responses

  • 200 application/json

    Material removed 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 or material not found

DELETE /api/v1/assignment/{id}/material/{materialId}
curl \
 --request DELETE 'http://localhost:3500/api/v1/assignment/assignment-123/material/material-1'
Response examples (200)
{
  "message": "Material removed successfully",
  "success": true
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}