Skip to content

Temp API Docs

Jack Fountain edited this page Mar 3, 2026 · 4 revisions

Not sure what the team prefers for API documentation so not going to spend a lot of time on this until we agree on something (especially since if you go to any of these through Django Rest Framework Docs you can play around with the API easily), whether it is Github Wiki, Postman, Bruno, etc

I found an open source ish tool called Hoppscotch that provides a Docker image I could throw on my AWS instance so we could store collections there.

PUT for updates for an entire object, PATCH for specific fields

Courses API

Method Endpoint Description
GET api/courses/ List all courses (Admins) or enrolled courses (Students)
POST api/courses/ Create a new course
GET api/courses/:course_code/ View Course Details
PUT / PATCH api/courses/:course_code/ Update Course
DELETE api/courses/:course_code/ Archive/Delete Course
GET api/courses/:course_code/units/ Nested: List units in this course
POST api/courses/:course_code/units/ Nested: Create a unit in this course
GET api/courses/:course_code/enrolments/ List students specifically in this course
POST api/courses/:course_code/enrolments/ Enrol a student in this course
GET api/courses/:course_code/questions/ List questions linked to this course

Units API

Method Endpoint Description
GET api/units/ Global List. Supports filtering (e.g., ?course=CHEM 1AA4)
POST api/units/ Global Create. Body must include course code
GET api/units/:unit_id/ Retrieve. Shows details + Subtopics list
PUT / PATCH api/units/:unit_id/ Update Unit
DELETE api/units/:unit_id/ Delete Unit
GET api/units/:unit_id/subtopics/ List subtopics in this unit
POST api/units/:unit_id/subtopics/ Create a subtopic in this unit

Subtopics API

Method Endpoint Description
GET api/subtopics/ Global List
POST api/subtopics/ Global Create. Body must include unit ID
GET api/subtopics/:subtopic_id/ Retrieve
PUT / PATCH api/subtopics/:subtopic_Id/ Update Subtopic
DELETE api/subtopics/:subtopic_id/ Delete Subtopic
GET api/subtopics/:subtopic_id/questions/ List questions for this subtopic
POST api/subtopics/:subtopic_id/questions/ Create a question here
GET api/subtopics/:subtopic_id/study-aids/ List study aids (PDFs/Videos)
POST api/subtopics/:subtopic_id/study-aids/ Create a study aid

Questions API

Method Endpoint Description
GET api/questions/ Global List
POST api/questions/ Global Create, body must include subtopic ID
GET api/questions/:question_uuid/ Retrieve, includes Options & Images
PUT / PATCH api/questions/:question_uuid/ Update Question text/metadata
DELETE api/questions/:question_uuid/ Delete Question
GET api/questions/:question_uuid/options/ List options
POST api/questions/:question_uuid/options/ Add an option
GET api/questions/:question_uuid/comments Returns all comments for a specific questions
POST api/questions/:question_uuid/comments Creates a new top level comment on that question

Comments API

Method Endpoint Description
GET api/comments/ Global List
GET api/comments/:comment_uuid/ Retrieve details of a comment, includes replies
PUT / PATCH api/comments/:comment_uuid/ Update comment text or replaces entire comment data
DELETE api/comments/:comment_uuid/ Delete comment
POST api/comments/:comment_uuid/reply Reply to a comment

Enrolment API

Method Endpoint Description
GET api/enrolments/ Global List, Shows all students you manage across all classes
GET api/enrolments/:enrolment_id/ Retrieve, View specific enrolment details
PUT / PATCH api/enrolments/:enrolment_id/ Update, Change status (e.g., promote to TA)
DELETE api/enrolments/:enrolment_id/ Un-enrol, Remove user from course

Study Aids API

Method Endpoint Description
GET api/study-aids/ Global List
GET api/study-aids/:study_aid_id/ Retrieve specific PDF/Video
PUT / PATCH api/study-aids/:study_aid_id/ Update
DELETE api/study-aids/:study_aid_id/ Delete study aid

Clone this wiki locally