Remove role from the user account
This endpoint is used to remove a role from a user account.
DELETE /openapi/v1/users/{user_id}/remove_role
Parameters: The request URL contains the following parameters
Name |
Type |
Description |
---|---|---|
user_id |
string |
ID of the user object being deleted. |
The JSON request body contains the following parameters
Name |
Type |
Description |
---|---|---|
role_id |
string |
ID of the role object to be removed. |
Response object: Returns the modified user object associated with the specified ID.
Sample python code
user_id = '5ce480db497d4f1ca1fc2b2b'
req_payload = {
"role_id": "5ce480d4497d4f1c155d0cef",
}
resp = restclient.delete('/users/%s/remove_role' % user_id,
json_body=json.dumps(req_payload))