Overview
The Materials API provides endpoints for managing educational resources including documents, slides, datasets, videos, and links. Materials support search, tagging, and access logging.Material Object
Unique material identifier
Material title
Material description
Format type:
document, slide, dataset, video, or linkUploaded file name (for non-link materials)
External URL (for link-type materials)
Visibility level:
institution, course, group, or publicAssociated course code
Array of tags for categorization
Searchable keywords
Combined search index field (title + description + keywords)
User ID of material uploader
ISO 8601 timestamp of creation
ISO 8601 timestamp of last update
List Materials
Search and filter materials with pagination.Request
Search query (searches title, description, keywords)
Filter by format:
document, slide, dataset, video, or linkFilter by tags (can be multiple)
Filter by visibility level
Filter by course code
Filter by uploader user ID
Page number for pagination
Number of materials per page
Response
Get Material
Retrieve a single material by ID. Automatically logs the view.Request
Response
- A
material_access_logentry with actionview - An
analytics_eventwith namematerial_view
Upload Material
Create a new material with file upload.Request
Material title
Material description
File to upload
Response
format=document and visibility=public. For more control, use PocketBase collection API directly.
Download Material
Download the file associated with a material.Request
Response
Returns the file with appropriateContent-Type and Content-Disposition headers.
Downloading a material automatically creates:
- A
material_access_logentry with actiondownload - An
analytics_eventwith namematerial_download
Update Material
Update material metadata. Uses PocketBase collection API.Request
Updated title
Updated description
Updated tags
Updated visibility level
Updated course code
Updated keywords
Response
Delete Material
Delete a material. Uses PocketBase collection API.Request
Response
HTTP 204 No ContentMaterial Formats
Supported material formats:document- PDF, Word, text documentsslide- Presentation slidesdataset- Data files, CSV, spreadsheetsvideo- Video files or linkslink- External URL (uselinkUrlfield instead offile)
Visibility Levels
public- Accessible to everyoneinstitution- Accessible to institution memberscourse- Accessible to specific course membersgroup- Accessible to specific group members
Access Logging
All material views and downloads are logged in thematerial_access_logs collection:
material- Material IDuser- User who accessed the materialaction- Eitherviewordownloadcreated- Timestamp of access
Search
Materials include a computedsearchTerms field that combines title, description, and keywords. The search is case-insensitive and searches across all these fields: