APIs to get, edit, delete, add student information. My SQL database is used.
API Request are as follows:
-
Get Information: Type: GET http:/localhost:8080/student/getStudents Request: Nothing
-
Edit Information: Type: PUT http:/localhost:8080/student/editStudent Request:
-
Add information: Type: POST http:/localhost:8080/student/addStudent Request: { "name": "studentname1", "email": "abc@gmail.com", "dob": "11/10/2000", "age": 22 }
-
Delete Information: http:/localhost:8080/student/deleteStudent/{id}
ID is needed for this.
After running the springboot application, copy the above URL's for testing.
MY SQL DATABASE
Student Table:
CREATE TABLE student{ id int primary key auto_increment, name varchar(200), email varchar(200), dob varchar(200), age int };