# Get materials by file type within a unit **GET /api/v1/materials/unit/{unitOfferingId}/type/{filetype}** Filter and retrieve materials by file type within a specific unit offering. **Supported File Types:** - **Documents:** pdf, doc, docx, ppt, pptx, txt, odt, rtf, xls, xlsx, csv - **Images:** jpg, jpeg, png, gif, bmp, tiff, svg, webp - **Videos:** mp4, webm, avi, mov, wmv, flv, mkv - **Audio:** mp3, wav, ogg, flac, aac, m4a - **Archives:** zip, rar, 7z, tar, gz - **Code:** html, css, js, py, java, cpp, c, php, json, xml - **Other:** Most standard file types are supported **Note:** Only non-executable and safe file types are allowed **Use Cases:** - Filter materials by type (e.g., only videos) - Download all PDFs from a course - Media gallery creation - File type analytics ## Servers - Local server: http://localhost:3500 (Local server) - Production server: https://api.echoplain.social (Production server) ## Parameters ### Path parameters - **unitOfferingId** (string) UUID of the unit offering - **filetype** (string) File type to filter by (case insensitive) ## Responses ### 200 Materials filtered by file type successfully #### Body: application/json (object) - **unitOffering** (object) - **filetype** (string) - **materials** (array[object]) - **totalMaterials** (number) ### 400 Default bad request error 400 response #### Body: application/json (object) - **message** (string) Response message - **error** (string) - **statusCode** (number) [Powered by Bump.sh](https://bump.sh)