Assignments

List Role Assignments Endpoint

get

Endpoint to list role assignments.

Args: role_id: ID of the role for which to list assignments. workspace_id: ID of the workspace for which to list assignments. project_id: ID of the project for which to list assignments. user: The authenticated user. rbac: RBAC component.

Returns: The users and teams that have this role assigned to them.

Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
role_idstring · uuidRequired
Query parameters
workspace_idany ofOptional
string · uuidOptional
or
nullOptional
project_idany ofOptional
string · uuidOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
get
/roles/{role_id}/assignments

Assign Role Endpoint

post

Endpoint to assign a role.

Args: role_id: ID of the role to assign. user_id: ID of the user to assign the role to. team_id: ID of the team to assign the role to. invitation_id: ID of the invitation to assign the role to. workspace_id: ID of the workspace to assign the role to. project_id: ID of the project to assign the role to. user: The authenticated user. rbac: RBAC component. organization_manager: Organization manager.

Returns: Model of the created role assignment.

Raises: ValueError: If both or None of user_id and team_id are specified. ValueError: If project_id is specified but workspace_id is not. IllegalOperationError: If the user/team and role are not part of the same organization. IllegalOperationError: If the role can't be assigned at the given scope. IllegalOperationError: If the role is a share role.

Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
role_idstring · uuidRequired
Query parameters
user_idany ofOptional
string · uuidOptional
or
nullOptional
team_idany ofOptional
string · uuidOptional
or
nullOptional
invitation_idany ofOptional
string · uuidOptional
or
nullOptional
workspace_idany ofOptional
string · uuidOptional
or
nullOptional
project_idany ofOptional
string · uuidOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
post
/roles/{role_id}/assignments

Revoke Role Endpoint

delete

Endpoint to revoke a role.

Args: role_id: ID of the role to revoke. user_id: ID of the user to revoke the role from. team_id: ID of the team to revoke the role from. invitation_id: ID of the invitation to revoke the role from. workspace_id: ID of the workspace to revoke the role from. project_id: ID of the project to revoke the role from. user: The authenticated user. rbac: RBAC component. organization_manager: Organization manager.

Raises: IllegalOperationError: If trying to revoke the admin role of an organization owner or the last assigned role of any organization member.

Authorizations
OAuth2clientCredentialsRequired
Token URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
role_idstring · uuidRequired
Query parameters
user_idany ofOptional
string · uuidOptional
or
nullOptional
team_idany ofOptional
string · uuidOptional
or
nullOptional
invitation_idany ofOptional
string · uuidOptional
or
nullOptional
workspace_idany ofOptional
string · uuidOptional
or
nullOptional
project_idany ofOptional
string · uuidOptional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
Responseany
delete
/roles/{role_id}/assignments

No content

Last updated

Was this helpful?