Users
Get All Users
GET /api/users
Returns all the Users.
*Requires Admin rights
Get User by ID
GET /api/users/[ID]
Returns the user that corresponds to the user ID.
*Requires Admin rights for other users, Logged in user can get it's own user
Request
Parameter | Type | Description |
---|---|---|
ID | ID | Uuid or the username of the User |
Response
User Object
Create User
POST /api/users
Creates a new User.
*Requires Admin rights
Request Body
1 2 3 4 5 6 7 8 |
|
Parameter | Type | Description |
---|---|---|
username | String | |
password | String | |
name | String | The name of the User - display name |
roles | UserRole [] | Array of user roles |
Response Body
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Parameter | Value | Description |
---|---|---|
_id | Uuid | The id of the User |
username | String | |
name | String | The name of the User |
roles | UserRole [] | Array of user roles |
createdAt | Date | Date and time the user was created |
updatedAt | Date | Date and time the user was last updated |
Update User
PUT /api/users/[ID]
Updates the User
Request
Parameter | Type | Description |
---|---|---|
ID | ID | Uuid or the username of the User |
Request Body
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
|
Response
The updated User object.
Delete User
DELETE /api/users/[ID]
Deletes the user that corresponds to the user ID.
Request
Parameter | Type | Description |
---|---|---|
ID | ID | Uuid or the username of the User |
Reset user settings
DELETE /api/users/[ID]/settings
Resets the user settings to the default for the user that corresponds to the user ID.
Request
Parameter | Type | Description |
---|---|---|
ID | ID | Uuid or the name of the User |
Response
The response is the updated User object.