Remove Role Assignments
Removes a set of RoleAssignments from the specified User. Currently unavailable in self-hosted ECE.
Body
Required
The Role Assignments to remove
-
Assignments for roles with platform scope.
Assignment for a role with platform scope.
-
Assignments for roles with organization scope.
Assignment for a role with organization scope.
-
Assignments for roles with deployment scope.
Assignment for a role with deployment scope.
-
Assignments for roles with project scope.
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://api.elastic-cloud.com/api/v1/users/{user_id}/role_assignments' \
--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"]}]}}'