GET /api/v1/materials/topic/{topicId}

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

Path parameters

  • topicId string Required

    UUID of the topic to get materials for

Responses

  • 200 application/json

    Topic materials retrieved successfully

    Hide response attributes Show response attributes object
    • topic object
      Hide topic attributes Show topic attributes object
      • id string
      • title string
      • description string
      • unitCode string
      • unitId string
    • materialsGroupedByLesson array[object]
      Hide materialsGroupedByLesson attributes Show materialsGroupedByLesson attributes object
      • lesson object
        Hide lesson attributes Show lesson attributes object
        • id string
        • title string
        • description string
        • order number
      • materials array
      • materialCount number
    • totalMaterials number
    • totalLessons number
  • 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
GET /api/v1/materials/topic/{topicId}
curl \
 --request GET 'https://api.echoplain.social/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
}