- Endpoint:
/user/:id
- Method: GET
- Description: Retrieves a user by their ID.
- Response:
- 200:
{ "id": 1, "name": "foo" }
- 404:
User not found
- 200:
- Endpoint:
/all-users
- Method: GET
- Description: Retrieves all users.
- Response:
- 200:
[{ "id": 1, "name": "foo" }, ...]
- 404: Invalid input
- 200:
- Endpoint:
/user/:id
- Method: POST
- Description: Creates a new user.
- Request Body:
{ "name": "foo" }
- Response:
- 201:
{ message: User Successfully Created }
- 400:
Incorrect Parameters
- 404:
User not found
- 201:
- Endpoint:
/users/:id
- Method: PUT
- Description: Updates user.
- Request Body:
{ "name": "foo" }
- Response:
- 200:
{ message: User Successfully Updated }
- 400:
Incorrect Parameters
- 404:
User not found
- 500:
Internal Server Error
- 200:
- Endpoint:
/users/:id
- Method: DELETE
- Description: Deletes user.
- Response:
- 200:
{ message: User Successfully Updated }
- 404:
User not found
- 500:
Internal Server Error
- 200: