| Endpoint: | /users/users |
|---|---|
| Method: | GET |
| Request header: | Authorization: Bearer <access_token> |
| Description: | Get the list of users |
| Permission required: | Administrator |
| Field | Type |
|---|---|
| message | string |
| message_type | string |
| result |
list of objects:
- id: string
- username: string
- admin: boolean
- enabled: boolean
- name: string (optional)
- email: string (optional)
- created: string
- last_modified: string
|
| Endpoint: | /users/user/<user_id> |
|---|---|
| Method: | GET |
| Request header: | Authorization: Bearer <access_token> |
| Description: | Get a user |
| Permission required: | Administrator if the user to get is other than the user that makes the request |
| Field | Type |
|---|---|
| message | string |
| message_type | string |
| result |
object:
- id: string
- username: string
- admin: boolean
- enabled: boolean
- name: string (optional)
- email: string (optional)
- created: string
- last_modified: string
|
| Endpoint: | /users/user |
|---|---|
| Methods: | POST, PUT |
| Request header: | Authorization: Bearer <access_token> |
| Description: | Create a user |
| Permission required: | Administrator |
| Field | Type | Required | Default value |
|---|---|---|---|
| username | string | Yes | |
| password | string | Yes | |
| admin | boolean | No | false |
| enabled | boolean | No | false |
| name | string | No | |
| string | No |
| Field | Type |
|---|---|
| message | string |
| message_type | string |
| result |
object
- user_id: string
|
| Endpoint: | /users/user/<user_id> |
|---|---|
| Method: | PUT |
| Request header: | Authorization: Bearer <access_token> |
| Description: | Update some or all fields of a user |
| Permission required: | Administrator if the user to update is other than the user that makes the request or if the fields to update include username, admin or enabled |
| Field | Type | Required | Default value |
|---|---|---|---|
| username | string | Yes | |
| password | string | Yes | |
| admin | boolean | No | false |
| enabled | boolean | No | false |
| name | string | No | |
| string | No |
| Field | Type |
|---|---|
| message | string |
| message_type | string |
| Endpoint: | /users/user/<user_id> |
|---|---|
| Method: | DELETE |
| Request header: | Authorization: Bearer <access_token> |
| Description: | Delete a user |
| Fresh access token required: | Yes |
| Permission required: | Administrator |
| Field | Type |
|---|---|
| message | string |
| message_type | string |