-
Notifications
You must be signed in to change notification settings - Fork 1
RESTful API Documentation
Visiting this link will show the routes that can be accessed to get all students, all employers, etc.
- Route:
https://ecse321-group17.herokuapp.com/
Returns a single student with the specified email.
- Route:
https://ecse321-group17.herokuapp.com/student/{email}
- Example:
https://ecse321-group17.herokuapp.com/student/student@mail.mcgill.ca
Returns a single employer with the specified email.
- Route:
https://ecse321-group17.herokuapp.com/employer/{email}
- Example:
https://ecse321-group17.herokuapp.com/employer/employer@company.ca
Returns a single administrator with the specified email.
- Route:
https://ecse321-group17.herokuapp.com/admin/{email}
- Example:
https://ecse321-group17.herokuapp.com/admin/admin@mcgill.ca
Returns a single co-op term with the specified ID.
- Route:
https://ecse321-group17.herokuapp.com/coop/{id}
- Example:
https://ecse321-group17.herokuapp.com/coop/123
Returns all co-op terms for the specified student.
- Route:
https://ecse321-group17.herokuapp.com/student/coops/{email}
- Example:
https://ecse321-group17.herokuapp.com/student/coops/student@mcgill.ca
Returns all students in the database.
- Route:
https://ecse321-group17.herokuapp.com/students
Returns all employers in the database.
- Route:
https://ecse321-group17.herokuapp.com/employers
Returns all co-op terms in the database.
- Route:
https://ecse321-group17.herokuapp.com/coops
Returns all co-op administrators in the database.
- Route:
https://ecse321-group17.herokuapp.com/admins
Returns all co-op terms for the specified employer.
- Route:
https://ecse321-group17.herokuapp.com/employer/coops/{email}
- Example:
https://ecse321-group17.herokuapp.com/employer/coops/employer@company.ca
Returns all co-op terms for the specified company.
- Route:
https://ecse321-group17.herokuapp.com/coops-by-company/{company}
- Example:
https://ecse321-group17.herokuapp.com/coops-by-company/Lightspeed
Returns all co-op terms for the specified company.
- Route:
https://ecse321-group17.herokuapp.com/employers-by-company/{company}
- Example:
https://ecse321-group17.herokuapp.com/employers-by-company/Facebook
Returns the status, start and end dates, and all report information for the specified co-op.
- Route:
https://ecse321-group17.herokuapp.com/progress/coop/{id}
- Example:
https://ecse321-group17.herokuapp.com/progress/coop/12345
Returns all reports across all co-ops done by the specified student.
- Route:
https://ecse321-group17.herokuapp.com/reports/student/{email}
- Example:
https://ecse321-group17.herokuapp.com/reports/student/student@mail.mcgill.ca
Returns all reports submitted for the specified co-op.
- Route:
https://ecse321-group17.herokuapp.com/reports/coop/{id}
- Example:
https://ecse321-group17.herokuapp.com/reports/coop/123
Returns relevant statistics for co-op terms that can be filtered by a specified range and co-op number, i.e. a co-op number of 2 would return the 2nd co-op terms of all students. StartTerm and EndTerm must be of the form Winter2019.
- Route:
https://ecse321-group17.herokuapp.com/statistics/coop/{startTerm}/{endTerm}/{coopNumber}
- Example:
https://ecse321-group17.herokuapp.com/statistics/coop/Summer2018/Summer2019/1
Returns relevant report statistics for co-op terms that can be filtered by a specified range and co-op number, i.e. a co-op number of 2 would return the 2nd co-op terms of all students. StartTerm and EndTerm must be of the form Winter2019.
- Route:
https://ecse321-group17.herokuapp.com/statistics/report/{startTerm}/{endTerm}/{coopNumber}
- Example:
https://ecse321-group17.herokuapp.com/statistics/report/Winter2018/Winter2019/2
Returns statistics related to the progress of a specific co-op.
- Route:
https://ecse321-group17.herokuapp.com/progress/coop/{id}
- Example:
https://ecse321-group17.herokuapp.com/progress/coop/321
Returns a list of students who have late reports or incomplete coops.
- Route:
https://ecse321-group17.herokuapp.com/problem-students
Returns all coops that have the specified status. Status can be NotStarted, InProgress, Completed, or Incomplete.
- Route:
https://ecse321-group17.herokuapp.com/coop-by-status/{status}
- Example:
https://ecse321-group17.herokuapp.com/coop-by-status/Completed
Returns the report with the specified ID.
- Route:
https://ecse321-group17.herokuapp.com/report/{id}
- Example:
https://ecse321-group17.herokuapp.com/report/123
Returns all reports that have the specified status. Status can be Unsubmitted, Submitted, Late, or Reviewed.
- Route:
https://ecse321-group17.herokuapp.com/report-by-status/{status}
- Example:
https://ecse321-group17.herokuapp.com/report-by-status/Late
Returns all reports that have the specified type. Report type can be Contract, Technical, StudentEval, EmployerEval, or TwoWeek.
- Route:
https://ecse321-group17.herokuapp.com/report-by-type/{type}
- Example:
https://ecse321-group17.herokuapp.com/report-by-type/Contract
Any string parameter values with multiple words should be separated by a +, as seen in examples below.
Creates a new student in the database.
Request Parameters:
-
email : String
- the new student's email address -
password : String
- the new student's password -
name : String
- the new student's name -
phone : String
- the new student's phone number -
studentId : Integer
- the new student's ID
Route: https://ecse321-group17.herokuapp.com/student/create
Example: https://ecse321-group17.herokuapp.com/student/create?email=student@mcgill.ca&password=pw&name=Albert+Kragl&phone=7781112233&studentId=260711711
Creates a new employer in the database.
Request Parameters:
-
email : String
- the new employer's email address -
password : String
- the new employer's password -
name : String
- the new employer's name -
phone : String
- the new employer's phone number -
company : String
- the new employer's company
Route: https://ecse321-group17.herokuapp.com/employer/create
Example: https://ecse321-group17.herokuapp.com/employer/create?email=employer@company.ca&password=pw&name=Employer+Person&phone=7781112234&company=Google
Creates a new co-op administrator in the database.
Request Parameters:
-
email : String
- the new administrator's email address -
password : String
- the new administrator's password -
name : String
- the new administrator's name -
phone : String
- the new administrator's phone number
Route: https://ecse321-group17.herokuapp.com/admin/create
Example: https://ecse321-group17.herokuapp.com/admin/create?email=admin@mcgill.ca&password=pw&name=Admin+Person&phone=7781112234
Creates a new co-op term in the database.
Request Parameters:
-
title : String
- the new co-op's title, e.g. "Software Engineer Intern" -
stuEmail : String
- the email of the student doing the co-op term -
empEmail : String
- the email of the co-op employer -
start : String
- the start date of the co-op, formatted as yyyy-mm-dd -
end : String
- the end date of the co-op, formatted as yyyy-mm-dd -
status : CoopStatus
- the co-op status (one of NotStarted, InProgress, Incomplete or Completed) -
salaryPerHour : Integer
- the salary per hour of the co-op position -
hoursPerWeek : Integer
- the number of hours of work per week -
address : String
- the address of where the student will be working
Route: https://ecse321-group17.herokuapp.com/coop/create
Example: https://ecse321-group17.herokuapp.com/coop/create?title=SWE+Intern&stuEmail=student@mcgill.ca&empEmail=employer@company.ca&start=2019-01-01&end=2019-05-01&status=NotStarted&salaryPerHour=20&hoursPerWeek=40&address=Montreal
Creates a single new notification object in the database.
Request Parameters:
-
text : String
- the message contents of the notification -
senderEmail : String
- the email of the person sending the notification -
stuEmail : String
- the email of the student receiving the notification (optional) -
empEmail : String
- the email of the employer receiving the notification (optional)
Route: https://ecse321-group17.herokuapp.com/notification/create
Example: https://ecse321-group17.herokuapp.com/notification/create?text=This+is+a+test+notification&senderEmail=admin@mcgill.ca&stuEmail=student@mcgill.ca
Creates multiple copies of a notification to send to multiple profiles.
Request Parameters:
-
text : String
- the message contents of the notification -
senderEmail : String
- the email of the person sending the notification -
stuEmail : List<String>
- the list of the emails of the students receiving the notification (optional) -
empEmail : List<String>
- the list of the emails of the employers receiving the notification (optional)
Route: https://ecse321-group17.herokuapp.com/notification/create-many
Example: https://ecse321-group17.herokuapp.com/notification/create-many?text=This+is+a+test+notification&senderEmail=admin@mcgill.ca&stuEmail=student1@mcgill.ca,student2@mcgill.ca,student3@mcgill.ca
Creates a new report object in the database. The date must be formatted as yyyy-mm-dd.
Request Parameters:
-
coopId : Integer
- the ID of the report's associated co-op term -
date : Date
- the date associated with the report, formatted as yyyy-mm-dd -
status : ReportStatus
- one of Unsubmitted, Submitted, Late, Reviewed -
type : ReportType
- one of Contract, Technical, StudentEval, EmployerEval, TwoWeek
Route: https://ecse321-group17.herokuapp.com/report/create
Example: https://ecse321-group17.herokuapp.com/report/create?coopId=1&date=2019-05-01&status=Submitted&type=Contract
Any string parameter values with multiple words should be separated by a +
, as seen in examples below.
Changes the status of a report in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
status : ReportStatus
- the report's new status
Route: https://ecse321-group17.herokuapp.com/report/updateStatus
Example: https://ecse321-group17.herokuapp.com/report/updateStatus?id=7&status=Reviewed
Changes the type of a report in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
type : ReportType
- the report's new type
Route: https://ecse321-group17.herokuapp.com/report/updateType
Example: https://ecse321-group17.herokuapp.com/report/updateType?id=7&type=Contract
Changes the due date of a report in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
date : Date
- the report's new type
Route: https://ecse321-group17.herokuapp.com/report/updateDate
Example: https://ecse321-group17.herokuapp.com/report/updateDATE?id=7&date=03-04-2019
Changes the status of a coop in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
status : CoopStatus
- the coop's new status
Route: https://ecse321-group17.herokuapp.com/coop/update
Example: https://ecse321-group17.herokuapp.com/coop/update?id=1&status=InProgress
Changes the title of a coop in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
title : String
- the coop's new status
Route: https://ecse321-group17.herokuapp.com/coop/updateTitle
Example: https://ecse321-group17.herokuapp.com/coop/updateTitle?id=1&title=Intern
Changes the start date of a coop in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
date : Date
- the coop's new start date
Route: https://ecse321-group17.herokuapp.com/coop/updateStart
Example: https://ecse321-group17.herokuapp.com/coop/updateStart?id=1&date=03-05-2019
Changes the end date of a coop in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
date : Date
- the coop's new end date
Route: https://ecse321-group17.herokuapp.com/coop/updateEnd
Example: https://ecse321-group17.herokuapp.com/coop/updateEnd?id=1&date=03-05-2019
Changes the address of a coop in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
address : String
- the coop's new address
Route: https://ecse321-group17.herokuapp.com/coop/updateAddress
Example: https://ecse321-group17.herokuapp.com/coop/updateAddress?id=1&address=Montreal
Changes the hourly pay of a coop in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
pay : Integer
- the coop's new pay per hour
Route: https://ecse321-group17.herokuapp.com/coop/updatePay
Example: https://ecse321-group17.herokuapp.com/coop/updatePay?id=1&pay=21
Changes the hours per week of a coop in the database.
Request Parameters:
-
id : Integer
- the ID of the report -
hours : Integer
- the coop's new hours per week
Route: https://ecse321-group17.herokuapp.com/coop/updateHours
Example: https://ecse321-group17.herokuapp.com/coop/updateHours?id=1&hours=40
Any string parameter values with multiple words should be separated by a +, as seen in examples below.
Deletes a report from the Database.
Request Parameters:
-
id : Integer
- the ID of the report to delete
Route: https://ecse321-group17.herokuapp.com/report/delete
Example: https://ecse321-group17.herokuapp.com/report/delete?id=7
Deletes a coop from the Database.
Request Parameters:
-
id : Integer
- the ID of the coop to delete
Route: https://ecse321-group17.herokuapp.com/coop/delete
Example: https://ecse321-group17.herokuapp.com/coop/delete?id=7
Deletes a student from the Database.
Request Parameters:
-
email : String
- the email of the student to delete
Route: https://ecse321-group17.herokuapp.com/student/delete
Example: https://ecse321-group17.herokuapp.com/student/delete?email=student@mcgill.ca