User

User

Namespaces

otp
providers

Members

(route) retrieve

Route:
MethodPath
GET /api/users/isLogged
Retrieve user metadata
Authentication

A authentication is needed to access this endpoint

Header Parameters:
Name Type Description
Authorization String bearer access token issued for the user
Response:
Name Type Description
user Object user model
Response Code:
Type Description
200 the user has been retrieved

Methods

(route) delete()

Route:
MethodPath
DELETE /api/users/delete
Delete the user
Authentication

A authentication is needed to access this endpoint

Header Parameters:
Name Type Description
Authorization String bearer access token issued for the user
Response:
Name Type Description
. Object user object
Response Code:
Type Description
500 database error
403 permission denied (hold buckets)
200 succesfully deleted the user

(route) show(:id)

Route:
MethodPath
GET /api/users/show/:id
Show public data about a user
Route Parameters:
Name Type Description
:id String user id
Response:
Name Type Description
String email user email
String username user pseudo
Response Code:
Type Description
500 database error
400 invalid parameters (no id provided)
404 no user account where found
200 the mail has been sent to the provided email
Parameters:
Name Type Description
:id user id

(route) update()

Route:
MethodPath
POST /api/users/update
Update metadata about the user
Authentication

A authentication is needed to access this endpoint

Body Parameters:
Name Type Attributes Description
username String optional
email String optional
old_password String optional
new_password String optional
info Object optional
Header Parameters:
Name Type Description
Authorization String bearer access token issued for the user
Response:
Name Type Description
. Object user object
Response Code:
Type Description
500 database error
400 missing parameters, no data to update
403 when updating the password, it need a new one
406 when updating the password, the old one is false
409 when updating email or username another user already have one of those two
200 succesfully updated the card