Skip to content

USER APIs

Paulo Roberto Donatilio Rego edited this page Aug 30, 2018 · 1 revision

The user api are:

  • GET /api/User - Get all users
Sample request:

GET api/User/{id}
You will receive:
Code: 200 - Sucess
Code: 400 - User not find
Code: 401 - Unauthorized Access
  • POST /api/User - Create a New user
Sample request:

POST api/User/

{
    "firstName": "string",
    "lastName": "string",
    "username": "string",
    "password": "string",
}
You will receive:

Code: 200 - Sucess
Code: 400 - If username exists or password is null
  • GET /api/User/{id} - Get a specific user by id
Sample request:

GET api/User/{id}
You will receive:
Code: 200 - Returns the user informed by Id
Code: 400 - If id is null or not found
Code: 401 - Unauthorized Access
  • PUT /api/User/{id} - Update the user informed by Id
Sample request:

PUT api/User/

{
    "firstName": "string",
    "lastName": "string",
    "username": "string",
    "password": "string",
}
You will receive:
Code: 200 - Sucess
Code: 400 - If the id is null or not found or the username is invalid
  • DELETE /api/User/{id} - Delete a specific user by id.
Sample request:

DELETE api/User/{id}
You will receive:
Code: 200 - Sucess
Code: 400 - If id is null or not found
Code: 401 - Unauthorized Access

Clone this wiki locally