GET


Description : retrieve the user list.
Returns : JSON

Responses

Depending of the validity of the request, different responses/status codes will be returned.

HTTP 200, 501

{ 
    "result": "list[str] | str"
}

Response parameters

  • result : the list of values or the error code.

    Example : ["jack", "john"], Error

POST


Description : create a new user.
Accepts : JSON
Returns : JSON

Body of the request

{
    "username": "str",
    "password": "str",
}

Body parameters

  • username : the username, must be at most 128 characters.

    Example : john

  • password : the password, must be at most 64 characters long.

    Example : @!j0hn!@

Responses

Depending of the validity of the request, different responses/status codes will be returned.

HTTP 200, 422, 501

{ 
    "result": "str"
}

Response parameters

  • result : the result or error code.

    Example : OK, Invalid body, Error

PATCH


Description : update an existing user.
Accepts : JSON
Returns : JSON

Body of the request

{   
    "type": "int",
    "username": "str",
    "data": "dict[str, str]",
}

Body parameters

  • type : the type of the modification (0 for username only, 1 for password only, 2 for both).

    Example : 0

  • username : the username of the user to be modified.

    Example : john

  • data : the modifications to apply to the user.

    Example : @!j0hn!@

The type and data parameters must be coherent, otherwise an error will be raised.

Responses

Depending of the validity of the request, different responses/status codes will be returned.

HTTP 200, 422, 501

{ 
    "result": "str"
}

Response parameters

  • result : the result or error code.

    Example : OK, Invalid body, Error

DELETE


Description : delete an existing user.
Accepts : JSON
Returns : JSON

Body of the request

{
    "username": "str"
}

Body parameters

  • username : the username of the user to be deleted.

    Example : john

Responses

Depending of the validity of the request, different responses will be returned.

HTTP 200, 501

{ 
    "result": "str"
}

Response parameters

  • result : the result of the request.

    Example : OK, Error