-
Notifications
You must be signed in to change notification settings - Fork 2
Restful Services Endpoints
To register a new student, use the following endpoint,
Post Mapping:
http://localhost:8080/student/{username}/{password}/{name}
- @PathVariable : username
- @PathVariable : password
- @PathVariable : name
To view all the students registered, use the following endpoint,
Get Mapping:
http://localhost:8080/students/
To log in student, use the following endpoint,
Post Mapping:
http://localhost:8080/student/{username}/{password}
- @PathVariable : username
- @PathVariable : password
To log out, use the following endpoint,
Put Mapping:
http://localhost:8080/logout
To view all the courses offered by the system, use the following endpoint,
Get Mapping:
http://localhost:8080/courses
To search for courses using course number, use the following endpoint,
Get Mapping:
http://localhost:8080/courses/{code}
- @PathVariable : code
To add a university to the system,
Post Mapping:
http://localhost:8080/university/{id}/{name}
- @PathVariable : id
- @PathVariable : name
To add a course to the system,
Post Mapping:
http://localhost:8080/course/{code}/{UniversityName}/{subject}
- @PathVariable : code
- @PathVariable : UniversityName
- @PathVariable : subject
To view all the universities offered by the system, use the following endpoint,
Get Mapping:
http://localhost:8080/universities
To search for all the courses offered by a specific university, use the following endpoint
Get Mapping:
http://localhost:8080/courses/university
- @PathVariable : university
(Note: university is a string for the university name)
To search for courses using the subject category, use the following endpoint,
Get Mapping:
http://localhost:8080/courses/subject/{sub}
- @PathVariable: sub
To list all available tutors along with their information for the selected course, use the following endpoint,
Get Mapping:
http://localhost:8080/courses/tutors/{courseCode}
- @PathVariable: courseCode
If the course does not exist, a student may request said course to be tutored. To do so use the following endpoint,
Post Mapping:
http://localhost:8080/course/request/{courseCode}/{subject}/{university}
- @PathVariable: courseCode
- @PathVariable: subject
- @PathVariable: universityName
To book a single room and notify the tutor, we use the following endpoint,
Post Mapping:
http://localhost:8080/session/{sessionId}/{tutorName}/{studentName}/{startTime}/{endTime}/{date}/{roomNr}/{courseCode}
- @PathVariable : sessionId
- @PathVariable : tutorName
- @PathVariable : studentName
- @PathVariable : roomNr
- @PathVariable : date
- @PathVariable : startTime
- @PathVariable : endTime
- @PathVariable : courseCode
To check room availability we use the following endpoint,
Get Mapping:
http://localhost:8080/room/checkAvail/{roomNr}/{testDate}/{testStartTime}/{testEndTime}
- @PathVariable : roomNr
- @PathVariable : testDate
- @PathVariable : testStartTime
- @PathVariable : testEndTime
Once a session gets created the tutor is automatically notified.
To assign a room to a session, we use the following endpoint,
Post Mapping:
http://localhost:8080/session/assign/{sessionId}/
- PathVariable: sessionId
To create a tutor review, we use the following endpoint,
Post Mapping:
http://localhost:8080/studentReview/{id}/{review}/{revieweeId}/{rating}/{reviewerId}
- @PathVariable : id
- @PathVariable : review
- @PathVariable : rating
- @PathVariable : revieweeId
- @PathVariable : reviewerId
To create a student review, we use the following endpoint,
Post Mapping:
http://localhost:8080//studentReview/{id}/{review}/{reviewerId}/{revieweeId}
- @PathVariable : id
- @PathVariable : review
- @PathVariable : reviewerId
- @PathVariable : revieweeId
To view the logged-in student's previous and upcoming sessions, use the following endpoint,
Get Mapping:
http://localhost:8080/sessions