List available roles
organizations.list_roles(strorganization_id, OrganizationListRolesParams**kwargs) -> OrganizationListRolesResponse
GET/organizations/{organization_id}/roles
Returns the list of available roles in the system for the organization. This includes both organization-level roles (e.g., org_admin, org_member) and zone-level roles (e.g., zone_manager, zone_viewer).
Each role includes:
name: Internal identifier (e.g., org_admin, zone_manager)label: Human-readable display name (e.g., Organization Administrator)scope: Whether the role applies at organization or zone level
Parameters
organization_id: str
Organization ID or label identifier
minLength1
maxLength255
expand: Optional[List[Literal["permissions"]]]
Fields to expand in the response. Currently supports "permissions" to include the permissions field with the caller's permissions for the resource.
x_client_request_id: Optional[str]
formatuuid
Returns
List available roles
from keycardai_api import KeycardAPI
client = KeycardAPI()
response = client.organizations.list_roles(
organization_id="x",
)
print(response.items){
"items": [
{
"description": "Full administrative access to all organization resources",
"label": "Organization Administrator",
"name": "org_admin",
"scope": "organization"
}
],
"permissions": {
"organizations": {
"read": true,
"update": true
},
"users": {
"read": true,
"list": true
}
}
}Returns Examples
{
"items": [
{
"description": "Full administrative access to all organization resources",
"label": "Organization Administrator",
"name": "org_admin",
"scope": "organization"
}
],
"permissions": {
"organizations": {
"read": true,
"update": true
},
"users": {
"read": true,
"list": true
}
}
}