Removes a set of RoleAssignments from the specified User. Currently unavailable in self-hosted ECE.
Query parameters
-
Whether or not to force the removal of role assignments (effective only for Platform Admins)
Default value is
false.
Responses
-
Role Assignments were successfully removed from the target User
-
The target user Id is invalid. (code:
role_assignments.invalid_target_user_id) -
Credentials were invalid. (code:
root.unauthorized) -
You are not authorised to remove the specified RoleAssignments. (code:
role_assignments.unauthorized_role_assignments)
DELETE
/users/{user_id}/role_assignments
curl \
--request DELETE 'https://{{hostname}}/api/v1/users/{user_id}/role_assignments' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{"platform":[{"role_id":"string"}],"organization":[{"role_id":"string","organization_id":"string"}],"deployment":[{"role_id":"string","organization_id":"string","all":true,"deployment_ids":["string"],"application_roles":["string"]}],"project":{"elasticsearch":[{"role_id":"string","organization_id":"string","all":true,"project_ids":["string"],"application_roles":["string"]}],"observability":[{"role_id":"string","organization_id":"string","all":true,"project_ids":["string"],"application_roles":["string"]}],"security":[{"role_id":"string","organization_id":"string","all":true,"project_ids":["string"],"application_roles":["string"]}]}}'