Skip to content

RESTful Service Endpoints

Georges Mourant edited this page Oct 31, 2019 · 10 revisions

1. Sign-in/Log-in

Once credentials are approved and the new tutor proceeds to the login page, they will either login with an existing account or have to create one.

RESTful service for login:

  • Functionality: GET
  • Parameters: email, password
  • Operation: checks if parameters match a user, and Returns TutorDTO
  • URL: /user/

RESTful serivce for creating an account:

  • Functionality: POST
  • Parameters: name, password, email
  • Operation: adds to User database, returns a User DTO
  • URL: /user/

2. Apply to teach new subjects (and availability indications)

Tutor must submit an application to the company manager for each subject they would like to teach.

RESTful serivce for submitting hours:

  • Functionality: POST
  • Parameters:
  • Operation: adds hours to Tutor's profile, returns Tutor DTO
  • URL: /profile/hours/

3. Set the hourly rate and know the commission rate

Once the tutor has been approved for a subject, tutor gets to set rate and retrieve the commission rate.

RESTful serivce for setting rate:

  • Functionality: POST
  • Parameters: hourly rate
  • Operation: adds hourly_rate to Tutor entry in Tutor database, returns Tutor DTO
  • URL: /profile/rate/

RESTful serivce for getting commission rate:

  • Functionality: GET
  • Parameters: none
  • Operation: returns Companydto
  • URL: /company_info/commission_rate/

4. Tutoring Requests (and request notifications)

(Backend needs to send email for every new entry in database too)

RESTful serivce for getting tutoring requests:

  • Functionality: GET
  • Parameters: none
  • Operation: returns Session DTOs where isRejected=false
  • URL: /sessions/

RESTful serivce for getting student reviews:

  • Functionality: GET
  • Parameters: student ID
  • Operation: where does it returns a Student review DTO ???
  • URL: /reviews/

RESTful serivce for getting student session history:

  • Functionality: GET
  • Parameters: student_id
  • Operation: returns a list of session DTOs where studentID=student_id
  • URL: /sessions/student_id

5. Reviews

After the tutoring session has finished, the tutor can login on the website and review the student and the system.

RESTful serivce for reviewing the student:

  • Functionality: POST
  • Parameters: session ID, rating, text review
  • Operation: adds tutor review to session (review of student from tutor), returns Session DTO
  • URL: /session/session_id/student_id/

RESTful serivce for reviewing the system:

  • Functionality: POST
  • Parameters: session ID, feedback paragraph
  • Operation: adds feedback to session, returns Session DTO
  • URL: /session/session_id/tutor_id/

Other cases:

RESTful serivce for updating an account:

  • Functionality: PUT
  • Parameters: name, password, email
  • Operation: update User profile information, return UserDTO
  • URL: /profile/

RESTful serivce for updating hours:

  • Functionality: PUT
  • Parameters:
  • Operation: adds hours to Tutor's profile, returns TutorDTO
  • URL: /profile/hours/

RESTful serivce for updating rate:

  • Functionality: PUT
  • Parameters: hourly rate
  • Operation: updates hourly_rate to Tutor entry in Tutor database, returns TutorDTO
  • URL: /profile/rate/
Clone this wiki locally