GET /api/v1/lesson/{id}/materials

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

Path parameters

  • id string Required

    UUID of the lesson to get materials for

Responses

  • 200 application/json

    Lesson materials retrieved successfully

    Hide response attributes Show response attributes object
    • lesson object
      Hide lesson attributes Show lesson attributes object
      • id string
      • title string
      • description string
      • topic string
      • unitCode string
      • unitId string
    • materials array[object]
      Hide materials attributes Show materials attributes object
      • id string
      • title string
      • originalName string
      • filetype string
      • fileUrl string
      • description string
      • uploadedAt string(date-time)
      • createdAt string(date-time)
    • totalMaterials number
  • 400

    Bad Request - Lesson not found

  • 401

    Unauthorized - JWT token required

GET /api/v1/lesson/{id}/materials
curl \
 --request GET 'https://api.echoplain.social/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
}