Update User Roles
Select
SaaS
This API can be used by MSPs to add or remove roles for a certain user. User Role update is asynchronous. Upon request submission, user record will be in "updating" status and will become "active" when update process finishes
Removing Account Manager role or Service Administrator role from user will also remove all the accounts the user manages.
Adding Service Administrator role to user will upgrade normal user to Administrator
Path Variables
Field | Description | Type | Notes |
---|---|---|---|
userId | User metallic id | UUID |
Request Body
Field | Description | Type | Required | Notes |
---|---|---|---|---|
action | Action for requested roles | String Enumeration. Allowed values: add / remove | True | |
roles | List of user role Ids | String Array | True | See - Available Roles |
Response Body
Field | Description | Type | Notes |
---|---|---|---|
id | User metallic id | UUID | |
status | User status | String Enumeration - User Status Enumeration | Refer to User Status Enumeration. Value "updating" is returned in this case. |
insertTs | User created time | Timestamp | |
updateTs | User last updated time | Timestamp | |
requestData | Update user roles Request Body | Update User Roles - Request Body | See - Update User Roles - Request Body |
Path Parameters
- userId string required
- application/json
Request Body required
Responses
- 200
OK
- application/json
- Schema
- Update User Roles - Success
Schema
{
"data": {
"id": "537FBFE1-88F4-480F-9063-2F6426536684",
"insertTs": "2022-01-19T19:23:44",
"updateTs": "2022-01-19T19:28:18",
"status": "updating",
"requestData": {
"action": "add",
"roles": [
"ROLE_ACCOUNT_MANAGER",
"ROLE_PRICINC_READER"
]
}
}
}
Loading...