Skip to content

Latest commit

 

History

History
59 lines (43 loc) · 4.84 KB

README.md

File metadata and controls

59 lines (43 loc) · 4.84 KB

Student Score Analyzer

An Spring Boot REST api that calculates student results in various subjects and retrieve the mean, median and mode score and send to an Angular app at https://student-score-analyzer.vercel.app/

API can be previewed at

https://desolate-harbor-08314.herokuapp.com/api/v1/

Frontend repo:

https://github.com/volunux/student-score-analyzer

List of API Route and Definition

NOTE: All Request should have an Accepts and Content-Type header with the value application/json and some Also API might take time to respond due to hibernation and idleness. API is hosted with Heroku.

Api Url is (Student Score Analyzer)[https://desolate-harbor-08314.herokuapp.com/api/v1/]

{id} is a placeholder or variable that should be replace with an Long value during request

Student Sample JSON

NB: {id} will be replace by student Id for Student Entity

Route Http Method Description Sample Body Options
/ GET API Entry
api/v1/student/entries GET Retrieve all records and can be narrow by emailAddress search ?search=[email protected]
api/v1/student/detail/{id} GET Retrieve single record
api/v1/student/delete/{id} DELETE Remove record
api/v1/student/create POST Add new record {"firstName": "Ayeniyi",
"lastName": "Adebiyi",
"emailAddress": "[email protected]",
"homeAddress" : "Ado Ekiti, Ekiti State" }
api/v1/student/update/{id} PUT Update a record {"firstName": "Ayomide",
"lastName": "Oyeloke",
"emailAddress": "[email protected]",
"homeAddress" : "Owo, Ondo State" }
api/v1/student/remove/many PUT Remove some record {"ids": [1, 2, 3]}

Subject Sample JSON

NB: {id} will be replace by subject Id for Subject Entity

Route Http Method Description Sample Body Options
/ GET API Entry
api/v1/subject/entries GET Retrieve all records and can be narrow by subjectCode search ?search=BIO111
api/v1/subject/detail/{id} GET Retrieve single record
api/v1/subject/delete/{id} DELETE Remove record
api/v1/subject/create POST Add new record {"title": "Machine Learning",
"code": "CPT123",
"year": 2011 }
api/v1/subject/update/{id} PUT Update a record {"title": "Machine Learning and Aritificial Intelligence",
"code": "CPT123",
"year": 2011 }
api/v1/subject/remove/many PUT Remove some record {"ids": [1, 2, 3]}

Score Sample JSON

NB: {id} will be replace by student Id from Student Entity

Route Http Method Description Sample Body Options
/ GET API Entry
api/v1/score/student/entries GET Retrieve all records and can be narrow by emailAddress search ?search=[email protected]
api/v1/score/student/detail/{id} GET Retrieve student score records
api/v1/score/student/analysis/{id} GET Retrieve student score records with calculated, mean, median and mode
api/v1/score/update/{id} PUT Add or Update a record {"studentId": 1,
"subjectScores": [{"scoreId" : 1,
"subjectId": 2,
"overallMark": 34},
{"scoreId" : 2,
"subjectId": 1,
"overallMark": 30},
{"scoreId" : 3,
"subjectId": 3,
"overallMark": 47},
{"scoreId" : 4,
"subjectId": 5,
"overallMark": 87}] }
api/v1/score/delete/entries/all DELETE Remove all records