RESTful Services Endpoints Guide - APorporino/ECSE-321-TutoringSystem GitHub Wiki
Appointment
GET /appointments/createAppointment
Description: Create an appointment.
Parameters:
-
long date
- UNIX timestamp
-
long startTime
- UNIX timestamp
-
long endTime
- UNIX timestamp
- String tutorUsername
- long roomId
-
String status
- Options: Requested, Accepted, Refused, Paid, Cancelled
GET /appointments/tutor/
Description: Get appointments for a particular tutor.
- String username
Availability
POST /availabilities/createAvailability
Description: Create an availability for a tutor.
- String tutorUsername
-
long date
- UNIX timestamp
-
long createdDate
- UNIX timestamp
-
long startTime
- UNIX timestamp
-
long endTime
- UNIX timestamp
GET /availabilities
Description: Fetch all availabilities (not tutor specific).
- No parameters.
GET /availabilities/getByTutor
Description: Fetch all availabilities for a specified tutor.
- String tutorUsername
GET /availabilities/getByDate
Description: Get all the availabilities in the database for a specific date.
-
long date
- UNIX timestamp
Person
POST /persons/createPerson
Description: Create a person.
- String firstName
- String lastName
- String username
-
String personType
- Options: Tutor, Student
- String password
- String email
- String sexe (optional)
- long age (optional)
POST /persons/
Description: Fetch all persons.
- No parameters
GET /persons/getByUsername/
Description: Get person by username.
- String username
GET /persons/getByEmail
Description: Get person by email.
- String email
GET /persons/getByFirstNameAndLastName
Description: Get list of persons by first name and last name.
- String firstName
- String lastName
Course
POST /courses/createCourses
-
String courseID
- eg.: ECSE321
- String courseName
-
String level
- Options: Highschool, Cegep, University
-
String subject
- Science, Math, Languages, History, etc.
Description: Create a course.
GET /courses
- No parameters.
Description: Fetch all courses.
GET /courses/courseID
-
String courseID
- eg.: ECSE321
Description: Get information about a course reference by its unique courseID.
GET /courses/subject
- String subject
Description: Lookup courses by subject.
SpecificCourse
POST /specificCourses/create
-
String hourlyRate
- eg.: 15.75
- String tutorUsername
-
String courseID
- eg.: ECSE321
Description: Create a SpecificCourse.
GET /specificCourses/tutor
- String username
Description: Retrieve all specificCourses for a specified tutor.
GET /specificCourses
- No parameters.
Description: Fetch all specificCourses.
Review
POST /reviews/createReview
Description: Create a review.
- String reviewText
- int rating
- String name_reviewee
- String name_reviewer
- long appointmentID
GET /reviews
Description: Fetch all reviews.
- No parameters.
GET /reviews/reviewByID
Description: Fetch a review by a specified reviewID.
- long id
GET /reviews/reviewsByReviewee
Description: Fetch alls reviews written to a specific reviewee.
- String name_reviewee
GET /reviews/reviewsByReviewer
Description: Fetch alls reviews written by a specific reviewer.
- String name_reviewer
GET /reviews/reviewsByAppointment
Description: Fetch alls reviews for a specified appointment.
- long appointmentID
Room
POST /rooms/createRoom
Description: Create a room.
- String roomID
-
String isBig
- Options: true (large room), false (regular/smaller room)
GET /rooms
Description: Fetch all rooms.
- No parameters.