Appearance
needAuth/User
Create one
POST
/user/create
This route is used to create a new user
Authorizations
bearer
Type
HTTP (bearer)
Parameters
Header Parameters
Authorization*
The jwt token created upon login
Type
Requiredstring
Example
"Bearer jwtToken"Request Body
application/json
JSON
{
"email": "informatique@polyflyx.com",
"username": "user-1768",
"firstname": "Thomas",
"lastname": "Samot",
"password": "123456",
"roleIds": [
],
"rightIds": [
]
}
Responses
application/json
JSON
{
}
Get user by id
GET
/user/{id}
Authorizations
bearer
Type
HTTP (bearer)
Parameters
Path Parameters
id*
The id of the user you're looking for
Type
Requiredstring
Example
"{{$number.int(min=1)}}"Responses
application/json
JSON
{
"email": "informatique@polyflyx.com",
"username": "user-1768",
"firstname": "Thomas",
"lastname": "Samot",
"roles": [
],
"rights": [
]
}
Update one
PATCH
/user/{id}
This route is used to update a user
Authorizations
bearer
Type
HTTP (bearer)
Parameters
Header Parameters
Authorization*
The jwt token created upon login
Type
Requiredstring
Example
"Bearer jwtToken"Path Parameters
id*
The id of the user you want to update
Type
Requiredstring
Request Body
application/json
JSON
{
"email": "informatique@polyflyx.com",
"username": "user-1768",
"firstname": "Thomas",
"lastname": "Samot",
"password": "123456",
"roleIds": [
],
"rightIds": [
]
}
Responses
application/json
JSON
{
}
Add role
Add right
POST
/user/{id}/right
This route is used to add rights to a user
Authorizations
bearer
Type
HTTP (bearer)
Parameters
Path Parameters
id*
The id of the user you want to add rights to
Type
Requiredinteger
Example
"{{$number.int(min=1)}}"Request Body
application/json
JSON
{
"rightIds": [
0
]
}
Responses
application/json
JSON
{
}