You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a user
URL: /api/add/user
Method : POST
Request Body:
{
"id": 0,
"name": "string",
"emailId": "string",
"mobile": 0
}
Response:
201 Successfully added user to db
417 User already present
Get all users
URL: /api/get/allUsers
Method : GET
No parameters
Response:
200 OK shows all users
404 No user found
Get user by id
URL: /api/get/user/{userId}
Method : GET
Pathvariable : userId (integer)
Response:
200 OK shows the user
404 User not found
Update user details
URL: /api/update/user
Method : PUT
Request Body:
{
"id": 0,
"name": "string",
"emailId": "string",
"mobile": 0
}
Response :
200 User details updated
404 User not found in db
Delete user from db
URL /api/delete/user/{userId}
Method : DELETE
Path variable : userId
Respose:
200 User deleted from db
404 User not found in db