Skip to main content

Methods

Retrieve all teams associated with the authenticated user. If the user is a tenant admin, returns all teams for the tenant. Pagination is available based on query parameters

Parameters

limit
typing.Optional[int]
Number of items per page
offset
typing.Optional[int]
Number of items to skip

Returns

SyncPager[Team]
SyncPager[Team]
🔗 TeamReturns an array of teams associated with the user or tenant And also the response includes paginated data

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.teams.list(
    limit=10,
    offset=10,
)

# Iterate through results
for item in response:
    print(item.name)

# Or paginate page by page
for page in response.iter_pages():
    for item in page:
        print(item.name)
Creates a new team or updates an existing team. It ensures that the team name is unique, valid, and that the team has at least one member. The members of the team are added or updated based on the provided emails.

Parameters

manifest
TeamManifest
required
🔗 TeamManifestTeam manifest
dry_run
typing.Optional[bool]
Dry run

Returns

GetTeamResponse
GetTeamResponse
🔗 GetTeamResponseReturns the created or updated team.

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.teams.create_or_update(
    manifest={"key": "value"},
    dry_run=False,
)
Get Team associated with provided team id

Parameters

id
str
required
Team Id

Returns

GetTeamResponse
GetTeamResponse
🔗 GetTeamResponseReturns the Team associated with provided team id

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.teams.get(
    id="id_value",
)
Deletes the Team associated with the provided Id.

Parameters

id
str
required
Team Id

Returns

DeleteTeamResponse
DeleteTeamResponse
🔗 DeleteTeamResponseSuccessfully deleted the team.

Usage

from truefoundry import TrueFoundry

client = TrueFoundry(
    api_key="YOUR_API_KEY",
    base_url="https://yourhost.com/path/to/api",
)

client.teams.delete(
    id="id_value",
)
I