Skip to main content

User Group API Reference

User Group API Reference

Customer-hosted cloud features

note

Some features are only available on customer-hosted clouds. Reach out to support@anyscale.com for info.

User Group CLI

anyscale user-group list

Usage

anyscale user-group list [OPTIONS]

List user groups in the organization.

Options

  • --max-items: Maximum number of user groups to return.

Examples

$ anyscale user-group list --max-items 50
ID Name
------------ ----------------
ug_abc123 Engineering
ug_def456 Data Science
ug_ghi789 Platform Team

anyscale user-group get

Usage

anyscale user-group get [OPTIONS]

Get a specific user group by ID.

Options

  • --id: The ID of the user group to retrieve.

Examples

$ anyscale user-group get --id ug_abc123
ID ug_abc123
Name Engineering
Organization ID org_abc123
Created At 2025-01-15 10:30:00 UTC
Updated At 2025-01-15 10:30:00 UTC

User Group SDK

anyscale.user_group.list

List user groups in the organization.

Returns a list of UserGroup objects.

Arguments

  • max_items (int) = 50: Maximum number of user groups to return.

Returns: List[UserGroup]

Examples

import anyscale

user_groups = anyscale.user_group.list(max_items=50)
for ug in user_groups:
print(f"{ug.id}: {ug.name}")

anyscale.user_group.get

Get a specific user group by ID.

Returns a UserGroup object.

Arguments

  • id (str): The ID of the user group to retrieve.

Returns: UserGroup

Examples

import anyscale

user_group = anyscale.user_group.get(id="ug_abc123")
print(f"{user_group.id}: {user_group.name}")

User Group Models

UserGroup

A user group in the organization.

Fields

  • id (str): The unique identifier of the user group.
  • name (str): The name of the user group.
  • org_id (str): The organization ID.
  • created_at (datetime): When the user group was created.
  • updated_at (datetime): When the user group was last updated.

Python Methods

def to_dict(self) -> Dict[str, Any]
"""Return a dictionary representation of the model."""

Examples

import anyscale

user_group = anyscale.user_group.get(id="ug_abc123")
print(f"{user_group.id}: {user_group.name}")