Skip to main content

Documentation Index

Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt

Use this file to discover all available pages before exploring further.

Methods

List all users of tenant filtered by query and showInvalidUsers. 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
query
typing.Optional[str]
show_invalid_users
typing.Optional[bool]
Show Deactivated users

Returns

SyncPager[User, ListUsersResponse]
SyncPager[User, ListUsersResponse]
🔗 ListUsersResponseReturns all users of 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.users.list(
    limit=10,
    offset=10,
    query="value",
    show_invalid_users="value",
)

# 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)
This endpoint allows tenant administrators to register users within their tenant.

Parameters

email
str
required
Email of the user
send_invite_email
typing.Optional[bool]
Send invite email if user does not exist
skip_if_user_exists
typing.Optional[bool]
Fail if user exists
dry_run
typing.Optional[bool]
Dry run
accept_invite_client_url
typing.Optional[str]
Url to redirect when invite is accepted

Returns

RegisterUsersResponse
RegisterUsersResponse
🔗 RegisterUsersResponseThe users have been successfully registered.

Usage

from truefoundry import TrueFoundry

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

client.users.pre_register_users(
    email="value",
    send_invite_email="value",
    skip_if_user_exists="value",
    dry_run=False,
    accept_invite_client_url="value",
)
This endpoint allows tenant administrators to update the roles of a user within their tenant.

Parameters

email
str
required
Email of the user
roles
typing.Sequence[str]
required
Role names for the user
resource_type
typing.Optional[str]
Resource Type

Returns

UpdateUserRolesResponse
UpdateUserRolesResponse
🔗 UpdateUserRolesResponseThe user roles have been successfully updated.

Usage

from truefoundry import TrueFoundry

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

client.users.update_roles(
    email="value",
    roles="value",
    resource_type="value",
)
Get User associated with provided User id

Parameters

id
str
required
User Id

Returns

GetUserResponse
GetUserResponse
🔗 GetUserResponseReturns the User associated with provided User id

Usage

from truefoundry import TrueFoundry

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

client.users.get(
    id="id_value",
)
Delete user if they are not a collaborator in any resource and not part of any team other than everyone.

Parameters

id
str
required
User Id
tenant_name
typing.Optional[str]
Tenant name

Returns

DeleteUserResponse
DeleteUserResponse
🔗 DeleteUserResponseUser has been successfully deleted.

Usage

from truefoundry import TrueFoundry

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

client.users.delete(
    id="id_value",
    tenant_name="value",
)
Invite a user to the tenant

Parameters

accept_invite_client_url
str
required
Url to redirect when invite is accepted
email
str
required
Email of user

Returns

InviteUserResponse
InviteUserResponse
🔗 InviteUserResponseUser has been successfully invited.

Usage

from truefoundry import TrueFoundry

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

client.users.invite_user(
    accept_invite_client_url="value",
    email="value",
)
Deactivate user associated with the provided email within the tenant.

Parameters

email
str
required
Email of the user
tenant_name
typing.Optional[str]
Tenant name

Returns

DeactivateUserResponse
DeactivateUserResponse
🔗 DeactivateUserResponseUser has been successfully deactivated.

Usage

from truefoundry import TrueFoundry

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

client.users.deactivate(
    email="value",
    tenant_name="value",
)
Activate user associated with the provided email within the tenant.

Parameters

email
str
required
Email of the user
tenant_name
typing.Optional[str]
Tenant name

Returns

ActivateUserResponse
ActivateUserResponse
🔗 ActivateUserResponseUser has been successfully activated.

Usage

from truefoundry import TrueFoundry

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

client.users.activate(
    email="value",
    tenant_name="value",
)
Change password for the authenticated user. Requires clientId and loginId in the request body.

Parameters

login_id
str
required
login id of the user(email)
new_password
str
required
New password
old_password
str
required
Old password

Returns

ChangePasswordResponse
ChangePasswordResponse
🔗 ChangePasswordResponsePassword has been changed successfully.

Usage

from truefoundry import TrueFoundry

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

client.users.change_password(
    login_id="value",
    new_password="value",
    old_password="value",
)
Get all resources associated with a user.

Parameters

id
str
required
User Id

Returns

GetUserResourcesResponse
GetUserResourcesResponse
🔗 GetUserResourcesResponseReturns all resources for the user.

Usage

from truefoundry import TrueFoundry

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

client.users.get_resources(
    id="id_value",
)
Get all role bindings associated with a user, including team-inherited bindings.

Parameters

id
str
required
User Id

Returns

GetUserPermissionsResponse
GetUserPermissionsResponse
🔗 GetUserPermissionsResponseReturns role bindings for the user (including team-inherited).

Usage

from truefoundry import TrueFoundry

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

client.users.get_permissions(
    id="id_value",
)
Get all teams associated with a user, including their role in each team.

Parameters

id
str
required
User Id

Returns

GetUserTeamsResponse
GetUserTeamsResponse
🔗 GetUserTeamsResponseReturns all teams for the user with their roles.

Usage

from truefoundry import TrueFoundry

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

client.users.get_teams(
    id="id_value",
)