Skip to content

Restful Services Endpoints

Mustafain Ali Khan edited this page Oct 31, 2019 · 44 revisions

R1: Register New Student

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/

R2: Student Log-In

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

R3: Search Using Course Number

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

The following post mappings were implemented to check if the get mappings work

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}

R4: Search Using University Name

R5: Search Using Subject Category

To search for courses using the subject category, use the following endpoint,
Get Mapping: http://localhost:8080/courses/{subject}

  • @PathVariable: subject

R6: Tutor Profile

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

R7: Request New Course

R8: Book a Session

R9: Check Room Availability

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

R10: Notify Tutor

R11: Assign Room

R12: Cancel Session

R13: Tutor Reviews

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

R14: Student Reviews

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

R15: Manage Session

To view the logged-in student's previous and upcoming sessions, use the following endpoint,
Get Mapping: http://localhost:8080/sessions