API Documentation

View employees

Use to view list of all employees.

URL : http://wynk.sachin-kumar.com/SpringTask/view

Method : GET

Success Response

Code : 200 Ok

Content example

{
      "id": "c0832ffe-8cc8-463d-adfc-da167899c0ad",
      "name": "Sachin Kumar",
      "department": "Wynk",
      "designation": "SDE"
}


Add employee

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"
}

Success Response

Code : 201 Created

Response example

{
    "message": "Employee added successfully!"
}


Update employee

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"
}

Success Response

Code : 200 Ok

Response example

{
    "message": "Employee updated successfully!"
}


Delete employee

Use to delete a employee from DB.

URL : http://wynk.sachin-kumar.com/SpringTask/delete/{id}

Method : DELETE

Success Response

Code : 200 Ok

Response example

{
    "message": "Employee deleted successfully!"
}