Users / Update
Update a users role, groups and status on tenant
Route: /api/{tenant:minlength(2)}/v{version:apiVersion}/users/{id}
Method: PUT
Authorisation: Minimum role: ADMIN
Response object
Response status: 200 (OK)
Response type: DTO_user
Wrapper: DTO_response_wrap
Other response statuses: 400 (BadRequest), 403 (Forbidden)
Response body example
DTO_tenant_user_update
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| groups | DTO_reference[] | Groups | |
| role | ENUM tenant_user_role | Role | |
| status | ENUM tenant_user_status | Status |
DTO_user
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| tenant_user | DTO_tenant_user | Tenant user | |
| created_by | DTO_reference_user | ReadOnly | Created by |
| last_updated_by | DTO_reference_user | ReadOnly | Last updated by |
| language | DTO_translation_language | ReadOnly | Language |
| id | Int32 | ReadOnly | Id |
| String | |||
| given_name | String | Given name | |
| family_name | String | Family name | |
| full_name | String | ReadOnly | Name |
| profile_pic | String | ReadOnly | Profile pic |
| created | DateTime | ReadOnly | Created |
| last_updated | DateTime | ReadOnly | Last updated |
| display_absolute_time | Boolean | ReadOnly | Display absolute time |
DTO_reference
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| id | Int32 | The id of the reference | |
| label | Object | ReadOnly | Name/Label from referenced object. |
DTO_tenant_user
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| groups | DTO_reference_is_admin[] | Groups | |
| id | Int32 | ReadOnly | Id |
| tenant_id | Int32 | Tenant id | |
| user_id | Int32 | User id | |
| role | ENUM tenant_user_role | Role | |
| status | ENUM tenant_user_status | Status | |
| last_seen | DateTime | Last seen |
DTO_reference_is_admin
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| is_admin | Boolean | ReadOnly | Is admin |
| id | Int32 | Id | |
| label | Object | ReadOnly | Label |
DTO_reference_user
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| profile_pic | String | ReadOnly | Profile pic |
| String | ReadOnly | ||
| id | Int32 | Id | |
| label | Object | ReadOnly | Label |
DTO_translation_language
| Name | Type | ReadOnly | Description |
|---|---|---|---|
| id | Int32 | ReadOnly | Leave empty on input |
| name | String | Name | |
| code | String | Code | |
| icon | String | ReadOnly | Icon |
| icon_sqare | String | ReadOnly | Icon sqare |
ENUM tenant_user_role
| Value | Name | Description |
|---|---|---|
| 0 | UNKNOWN | UNKNOWN |
| 1 | OWNER | Owner |
| 2 | ADMIN | Admin |
| 3 | USER | User |
ENUM tenant_user_status
| Value | Name | Description |
|---|---|---|
| 0 | UNKNOWN | UNKNOWN |
| 1 | ACTIVE | ACTIVE |
| 2 | DEACTIVE | DEACTIVE |