Roles

Create Role Endpoint

post

Endpoint to create a role.

Args: role: The role to create. user: The authenticated user. rbac: RBAC component.

Raises: IllegalOperationError: If the role is an organization role. IllegalOperationError: If the role has no permissions.

Returns: The created role.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Body

Model for creating roles.

nameany ofOptional
string · min: 1 · max: 50Optional
or
nullOptional
descriptionany ofOptional
string · min: 1 · max: 256Optional
or
nullOptional
organization_idstring · uuidRequired
levelstring · enumRequired

Scope levels.

Possible values:
system_managedbooleanRequired
typestring · enumOptional

Enum that represents the type of a role.

Default: normalPossible values:
Responses
chevron-right
200

Successful Response

application/json
post
/roles

Get Role Endpoint

get

Endpoint to get a role.

Args: role_id: ID of the role to get. user: The authenticated user. rbac: RBAC component.

Returns: The role.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
role_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json
get
/roles/{role_id}

Delete Role Endpoint

delete

Endpoint to delete a role.

Args: role_id: ID of the role to delete. user: The authenticated user. rbac: RBAC component.

Raises: IllegalOperationError: If the role is system managed.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
role_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json
Responseany
delete
/roles/{role_id}

No content

Update Role Endpoint

patch

Endpoint to update a role.

Args: role_id: ID of the role to update. update: The role update. user: The authenticated user. rbac: RBAC component.

Raises: IllegalOperationError: If the role has no permissions.

Returns: The updated role.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
role_idstring · uuidRequired
Body

Model for updating roles.

nameany ofOptional
string · min: 1 · max: 50Optional
or
nullOptional
descriptionany ofOptional
string · min: 1 · max: 256Optional
or
nullOptional
Responses
chevron-right
200

Successful Response

application/json
patch
/roles/{role_id}

Last updated

Was this helpful?