Skip to content
Alexander Van Oyen edited this page Feb 21, 2024 · 27 revisions

We will probably be using swagger/openAPI for our API implementation.

API requests

(Work in progress)

Admin

(Admins should be able to perform every request, they will have no restrictions.)

Method Endpoint Description
POST /user create a new user (returns the id)
PUT /user/{userid} update user data
DELETE /user/{userid} delete a user
GET /user/{userid} get user data

Teacher

Method Endpoint Description
POST /subject create a new subject (returns the id)
DELETE /subject/{subject_id} delete subject with given id
PUT /subject/{subject_id} update subject data
GET /subject/{subject_id} get all data about a subject
POST /subject/{subject_id}/project create a new project for a subject
DELETE /subject/{subject_id}/project/{project_id} delete a project from a subject
GET /subject/{subject_id}/project/{project_id} get all data about a project (get submissions)
PUT /subject/{subject_id}/project/{project_id} update project data

Student

Method Endpoint Description
GET /user get all user data (can only access own data)
PUT /user update user data (can only update own data)
DELETE /user remove the user (can only remove themself)
POST /user/subject/{subject_id} subscribe to subject
POST /user/subject/{subject_id}/project/{project_id} submit project
PUT /user/subject/{subject_id}/project/{project_id} update project submission
GET /user/subject/{subject_id}/project/{project_id} get project submission
POST /user/subject/{subject_id}/group/{group_id} join group
GET /user/subject/{subject_id}/group/{group_id} get group members
Clone this wiki locally