POST /api/v3/users/actions/RemoveUserRole

Removes user(s) who are not part of any active classes, pocs, or environments, and supports the replacement of users who are part of any active classes, pocs, or environments.

* Each request is limited to one project id, one team id, and one role. Multiple calls should be made if you wish to remove users from different projects, teams within a project, and/or different user roles.

** All body parameters need to coincide in order to implement any changes. The project id, team id, and role must match to the user id.

*** In order to remove an active user, you can replace them with another user. Use the replace user query parameter and the relevant user id to replace and remove users. The replacement user will receive ownership of any end-user environments, policies, and invitations.

Request Path

POST /api/v3/users/Actions/RemoveUserRole?replacingUserId={userId}

Request Payload

users: [{id:}, {id:…}],
projectId: ,
teamId: ,

Body Parameters

Body parameter Type Description
users Array[user] Required. The user id that will replace an existing user. The users must be a part of the same project, team, and must have the same role.
projectId string Required. The project id which the user is a part of. Only one project id can be specified per call.
teamId string Required for all roles except if role = 8. The team id which the users are a part of. Only one team id can be specified per call.
role enum[Role] Required. The role which the users share. Only one role can be specified per call.
2=TeamMember, 4=TeamManager, 8=ProjectManager.

Query Parameters

Query parameter Type Description
replacingUserId string Optional

Request Example

    "users": [{id:"USMVysHnO_uN8v0OX8CUhBbq2"}, {id:"USMVysHnO_uN8v0OX8CUhBbq3"}],
    "projectId": "PRjTcEu83MXmpDAHTf47b-QQ2",
    "teamId": "TMXrjiUu7WTjGuctqTUJ0wXQ2",
    "role": 2

Response Example

    results: [
        invitee :{
	        email: string,
	        firstName: string,
	        lastName: string
	        success : true/false,
	        errorMsg: string,	

Error Response Example

    "message": <string>,
    "code": <string>,
    "exceptionMessage": <string>,
    "exceptionType": <string>,
    "stackTrace": <string>

Possible Error strings

Error Description String
InvalidApiParameterException If one of the ids supplied by the user is not valid.
Request body parameters don’t coincide.
Request body parameters don’t match.
PermissionDeniedException If the requesting user does not have permission to remove these users. Request cannot be completed due to missing permissions.
General error An error has occurred while processing the request, please try again. If the problem persists please contact support for help.
PermissionDeniedException User(s) must be replaced in order to remove them. User(s) are active and must be replaced in order to be removed.