Dockerized REST Api containing endpoints for CRUD operations for Students and Faculty
Goals:
-
Setup PSQL database to store Students and Faculty
-
Develop RESTful endpoint to manage records
-
Dockerize it
Docker image location: Docker
Endpoints:
- /api/v1/student
- GET
- Returns JSON of all Students in the database
- POST
- Accepts JSON body of new student to be added
- GET
- /api/v1/student/{studentId}
- GET
- Return single student by provided ID
- PUT
- Updates student record at the provided ID
- PARAMS
- name=String
- email=String
- dob=String
- DELETE
- Deletes Student record at the provided ID
- GET
Example POST Body:
{
"name": "student name",
"email": "[email protected]",
"dob": "1991-05-01"
}
- /api/v1/faculty
- GET
- Returns JSON of all Faculty in the database
- POST
- Accepts JSON body of new faculty to be added
- GET
- /api/v1/faculty/{facultyId}
- GET
- Return single faculty by provided ID
- PUT
- Updates faculty record at the provided ID
- PARAMS
- name=String
- department=String
- position=String
- manager=String
- email=String
- dob=String
- DELETE
- Deletes faculty record at the provided ID
- GET
Example POST Body:
{
"name": "faculty name",
"department": "department name",
"position": "new position",
"manager": "updated manager",
"email": "[email protected]",
"dob": "1982-07-11"
}