GET /api/v1/materials/unit/{unitOfferingId}/search

Search for materials by title, filename, or description within a specific unit offering.

Search Fields:

  • Material title
  • Original filename
  • Description text

Features:

  • Case-insensitive search
  • Partial matching
  • Returns associated lesson information

Use Cases:

  • Quick material lookup
  • Content discovery
  • Material organization
  • Student resource finding

Path parameters

  • unitOfferingId string Required

    UUID of the unit offering to search within

Query parameters

  • q string Required

    Search query string

Responses

  • 200 application/json

    Search results retrieved successfully

    Hide response attributes Show response attributes object
    • unitOffering object
      Hide unitOffering attributes Show unitOffering attributes object
      • id string
      • code string
    • searchQuery string
    • materials array
    • totalResults 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/unit/{unitOfferingId}/search
curl \
 --request GET 'http://localhost:3500/api/v1/materials/unit/987fcdeb-51a2-4567-9876-543210987654/search?q=introduction'
Response examples (200)
{
  "unitOffering": {
    "id": "string",
    "code": "CS101"
  },
  "searchQuery": "introduction",
  "materials": [],
  "totalResults": 3
}
Response examples (400)
{
  "message": "string",
  "error": "string",
  "statusCode": 42.0
}