Retrieve all learning materials from all lessons within a specific topic.
Returns:
- Topic information
- Materials grouped by lesson
- All materials in a flat list
- Summary statistics
Use Cases:
- Topic overview page
- Bulk material download
- Topic progress tracking
GET
/api/v1/materials/topic/{topicId}
curl \
--request GET 'http://localhost:3500/api/v1/materials/topic/789abcde-f012-3456-7890-123456789abc'
Response examples (200)
{
"topic": {
"id": "string",
"title": "Object-Oriented Programming",
"description": "string",
"unitCode": "CS102",
"unitId": "string"
},
"materialsGroupedByLesson": [
{
"lesson": {
"id": "string",
"title": "Classes and Objects",
"description": "string",
"order": 1
},
"materials": [],
"materialCount": 3
}
],
"totalMaterials": 15,
"totalLessons": 5
}
Response examples (400)
{
"message": "string",
"error": "string",
"statusCode": 42.0
}