Use to view list of all employees.
URL : http://wynk.sachin-kumar.com/SpringTask/view
Method : GET
Code : 200 Ok
Content example
{
"id": "c0832ffe-8cc8-463d-adfc-da167899c0ad",
"name": "Sachin Kumar",
"department": "Wynk",
"designation": "SDE"
}
Use to add a employee to DB.
URL : http://wynk.sachin-kumar.com/SpringTask/add
Method : POST
Data constraints
{
"name": "[valid name]",
"department": "[valid department]",
"designation": "[valid designation]"
}
Data example
{
"name": "Sachin Kumar",
"department": "Wynk",
"designation": "SDE"
}
Code : 201 Created
Response example
{
"message": "Employee added successfully!"
}
Use to update a employee in DB.
URL : http://wynk.sachin-kumar.com/SpringTask/update/{id}
Method : PUT
Data constraints
{
"id": "[valid id]",
"name": "[valid name]",
"department": "[valid department]",
"designation": "[valid designation]"
}
Data example
{
"id": "c0832ffe-8cc8-463d-adfc-da167899c0ad",
"name": "Sachin Kumar",
"department": "Wynk",
"designation": "SDE"
}
Code : 200 Ok
Response example
{
"message": "Employee updated successfully!"
}
Use to delete a employee from DB.
URL : http://wynk.sachin-kumar.com/SpringTask/delete/{id}
Method : DELETE
Code : 200 Ok
Response example
{
"message": "Employee deleted successfully!"
}