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

User download

Michał B edited this page Nov 11, 2018 · 3 revisions

Users download

Important information

  • Available at URI: http://localhost:5000/user-management/users
  • Type of success response: 200 Ok with data
  • Type of error response: 400 with error message
  • HTTP method type: GET

Sending data

  • The data is sent as a query parameters in URL.
  • Available URL parameters:
    • registrationDate: date when the user was registered
    • query: string that is a part of the user nick
    • fields: the names of the requested fields to be downloaded, separated by a comma

Example of the valid URL with parameters:

http://localhost:5000/user-management/users?query=Tiger&registrationDate=2018-09-07&fields=id,nick,userImage

Receiving data

  • If all data in URL are valid, then WebAPI returns requested data.
  • If data aren't valid, the WebAPI returns 400 Bad Request with an error message.

For example, when the WebAPI receives not valid data:

{
    "registrationDate": [
        "The value 'ooo' is not valid for RegistrationDate."
    ]
}

User download

Important information

  • Available at URI: http://localhost:5000/user-management/users/{id}
  • Type of success response: 200 Ok with data
  • Type of error response: 400 with error message
  • HTTP method type: GET

Sending data

  • The data is sent as a query parameters in URL.
  • Available URL parameters:
    • fields: the names of the requested fields to be downloaded, separated by a comma

Example of the valid URL with parameters:

http://localhost:5000/user-management/users/14?fields=id,nick,userImage

Receiving data

  • If all data in URL are valid, then WebAPI returns requested data.
  • If data aren't valid, the WebAPI returns 400 Bad Request with an error message.
Clone this wiki locally