For the complete documentation index, see llms.txt. This page is also available as Markdown.

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:

OAuth2authorizationCodeRequired
Authorization URL: Token URL: Refresh URL:
Path parameters
organization_idstring · uuidRequired
Query parameters
namestring · nullableOptional
user_idstring · uuid · nullableOptional
team_idstring · uuid · nullableOptional
resourcestring · nullableOptional
actionstring · nullableOptional
system_managedboolean · nullableOptional
typestring · enum · nullableOptional

Enum that represents the type of a role.

Default: normalPossible values:
assigned_to_current_userbooleanOptionalDefault: false
workspace_scopestring · uuid · nullableOptional
project_scopestring · uuid · nullableOptional
offsetintegerOptionalDefault: 0
limitinteger · max: 100OptionalDefault: 100
Responses
200

Successful Response

application/json

Model for viewing roles.

namestring · min: 1 · max: 50 · nullableOptional
descriptionstring · min: 1 · max: 256 · nullableOptional
idstring · uuidRequired
organization_idstring · uuidRequired
levelstring · enumRequired

Scope levels.

Possible values:
system_managedbooleanRequired
typestring · enumRequired

Enum that represents the type of a role.

Possible values:
get/organizations/{organization_id}/roles
GET /organizations/{organization_id}/roles HTTP/1.1
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"
  }
]
ZenML Scarf

Last updated

Was this helpful?