User Management
Overview
The User Management module enables you to efficiently administer and regulate user access within your workspace.
This module offers a comprehensive set of tools to list all users, send invitations to new members, disable users' accounts, and precisely control users' roles and permissions.
Get all active users
Retrieves all active users.
none
# First party modules
from paradime import Paradime
# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")
# Get all active users
active_users = paradime.users.list_active()
Get a user by email
Retrieves a user by email.
email
(str)
: The email of the user to retrieve.
# First party modules
from paradime import Paradime
# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")
# Get a user by email
user = paradime.users.get_by_email(email="[email protected]")
Get all invited users
Retrieves all invited users.
none
# First party modules
from paradime import Paradime
# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")
# Get all invited users
invited_users = paradime.users.list_invited()
Invite a user
Invites a user to the workspace.
email
(str)
: The email of the user to invite.
account_type
(UserAccountType)
: The account type of the user to invite.
# First party modules
from paradime import Paradime
from paradime.apis.users.types import UserAccountType
# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")
# Invite a user as an admin
paradime.users.invite(email="[email protected]", account_type=UserAccountType.ADMIN)
Update a user's account type
Updates the account type of a user.
uid
(str)
: The ID of the user to update the account type for.
account_type
(UserAccountType)
: The new account type for the user.
# First party modules
from paradime import Paradime
from paradime.apis.users.types import UserAccountType
# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")
# Update a user's account type
paradime.users.update_account_type(user_uid=user.uid, account_type=UserAccountType.DEVELOPER)
Disable a user
Disable a user in the workspace.
uid
(str)
: The ID of the user to disable.
# First party modules
from paradime import Paradime
# Create a Paradime client with your API credentials
paradime = Paradime(api_endpoint="API_ENDPOINT", api_key="API_KEY", api_secret="API_SECRET")
# Disable a user
paradime.users.disable(user_uid=user.uid)
Last updated
Was this helpful?