Retrieve all learning materials associated with a specific lesson.
Returns:
- Lesson information (title, description, topic, unit)
- List of all materials with file details
- Total count of materials
Use Cases:
- Display materials in lesson detail view
- Student accessing lesson resources
- Lecturer reviewing lesson materials
GET
/api/v1/lesson/{id}/materials
curl \
--request GET 'http://localhost:3500/api/v1/lesson/123e4567-e89b-12d3-a456-426614174000/materials'
Response examples (200)
{
"lesson": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"title": "Introduction to Data Structures",
"description": "Basic concepts of arrays and linked lists",
"topic": "Fundamentals of Programming",
"unitCode": "CS101",
"unitId": "987fcdeb-51a2-4567-9876-543210987654"
},
"materials": [
{
"id": "456e7890-e12b-34c5-d678-901234567890",
"title": "Lecture_Notes.pdf",
"originalName": "Lecture_Notes.pdf",
"filetype": "pdf",
"fileUrl": "https://bucket.s3.region.amazonaws.com/file.pdf",
"description": "Lesson material",
"uploadedAt": "2025-05-04T09:42:00Z",
"createdAt": "2025-05-04T09:42:00Z"
}
],
"totalMaterials": 5
}