# get the default IAM integrationdefault_iam_integration = organization.get_default_iam_integration()# get all of the IAM integrations (returns a list of IAMIntegration objects)iam_integrations = organization.get_iam_integrations()for integration in iam_integrations: print(integration)
Depending on the level of access required, you can:
Invite users to a workspace without assigning them to any projects.
Invite users to a workspace and assign them to specific projects.
Copy
Ask AI
# get and view the available rolesroles = client.get_roles()print("Roles: ", roles)# create an invitation for an organization-wide role (in this case, a labeler)organization.invite_user( email="<email_address>", role=roles["LABELER"])
project_id = "<project_id>"# For the entire organizationorg_invites = organization.get_invites()# For a specific projectproject_invites = organization.get_project_invites(project_id)
# get the users (relationship to User objects)users = organization.users()# inspect one usernext(users)# inspect all usersfor user in users: print(user)# for ease of use, you can convert the paginated collection to a listlist(users)
# get the projects (relationship to Project objects)projects = organization.projects()# inspect one projectnext(projects)# inspect all projectsfor project in projects: print(project)# for ease of use, you can convert the paginated collection to a listlist(projects)
# get the webhooks (relationship to Webhook objects)webhooks = organization.webhooks()# inspect one webhooknext(webhooks)# inspect all webhooksfor webhook in webhooks: print(webhook)# for ease of use, you can convert the paginated collection to a listlist(webhooks)