Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

User update

Michał B edited this page Sep 19, 2018 · 1 revision

User update

Important information

  • Available at URI: http://localhost:5000/user-management/users/{id}
  • Type of success response: 204 No Content
  • Type of error response:
    • 400 with error message
    • 403 Forbidden
  • HTTP method type: PUT

Sending data

  • The data is sent in JSON format.
  • Request body consists of:
    • login: ulong representing the login hash, parsed to the string format
    • userEmail: ulong representing the user email hash, parsed to the string format

Example of the valid JSON request body:

{
    "login": "1232315685215942525",
    "userEmail": "1123224251563205642"
}

Receiving data

  • If all data in JSON request are valid and the user was successfully updated, then WebAPI returns 204 No Content
  • If data aren't valid or the user doesn't exist, the WebAPI returns 400 Bad Request with an error message.

For example, when the WebAPI receives not valid data:

{
    "Login": [
        "The length of 'Login' must be 20 characters or fewer. You entered 21 characters.",
        "Invalid value!"
    ],
    "UserEmail": [
        "The length of 'User Email' must be 20 characters or fewer. You entered 22 characters.",
        "Invalid value!"
    ]
}
Clone this wiki locally