Roles

List Organization Roles Endpoint

get

Endpoint to list roles of an organization.

Args: organization_id: Organization id. name: Name of the role to filter by. user_id: User ID to filter by. team_id: Team ID to filter by. resource: Resource to filter by. action: Action to filter by. system_managed: Filter by the system managed property. type: Type of the role to filter by. level: Level of the role to filter by. assigned_to_current_user: If True, only include roles assigned to the current user. workspace_scope: Scope at which the role is assigned. project_scope: Scope at which the role is assigned. offset: Offset for pagination. limit: Limit for pagination. user: Authenticated user. rbac: RBAC component.

Raises: ValueError: If both user_id and assigned_to_current_user are set.

Returns: List of all roles matching the given filters.

Authorizations
OAuth2clientCredentialsRequired
Token URL: Refresh URL:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
organization_idstring · uuidRequired
Query parameters
nameany ofOptional
stringOptional
or
nullOptional
user_idany ofOptional
string · uuidOptional
or
nullOptional
team_idany ofOptional
string · uuidOptional
or
nullOptional
resourceany ofOptional
stringOptional
or
nullOptional
actionany ofOptional
stringOptional
or
nullOptional
system_managedany ofOptional
booleanOptional
or
nullOptional
typeany ofOptionalDefault: normal
string · enumOptional

Enum that represents the type of a role.

Possible values:
or
nullOptional
levelany ofOptional
or
nullOptional
assigned_to_current_userbooleanOptionalDefault: false
workspace_scopeany ofOptional
string · uuidOptional
or
nullOptional
project_scopeany ofOptional
string · uuidOptional
or
nullOptional
offsetintegerOptionalDefault: 0
limitinteger · max: 100OptionalDefault: 100
Responses
200

Successful Response

application/json
get
/organizations/{organization_id}/roles
GET /organizations/{organization_id}/roles HTTP/1.1
Host: 
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
  {
    "name": "text",
    "description": "text",
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "organization_id": "123e4567-e89b-12d3-a456-426614174000",
    "level": "organization",
    "system_managed": true,
    "type": "normal"
  }
]

Last updated

Was this helpful?