cterasdk.core.admins module#
- class cterasdk.core.admins.Administrators(core)#
Bases:
BaseCommand
Portal Global Administrators User Management APIs
- add(name, email, first_name, last_name, password, role, company=None, comment=None, password_change=False)#
Create a Global Administrator
- Parameters:
name (str) – User name for the new GlobalAdmin
email (str) – E-mail address of the new GlobalAdmin
first_name (str) – The first name of the new GlobalAdmin
last_name (str) – The last name of the new GlobalAdmin
password (str) – Password for the new GlobalAdmin
role (cterasdk.core.enum.Role) – User role of the new GlobalAdmin
company (str,optional) – The name of the company of the new GlobalAdmin, defaults to None
comment (str,optional) – Additional comment for the new GlobalAdmin, defaults to None
password_change (variable,optional) – Require the user to change the password on the first login. Pass datetime.date for a specific date, integer for days from creation, or True for immediate , defaults to False
- default = ['name']#
- delete(name)#
Delete a Global Administrator
- Parameters:
username (str) – Global administrator username
- get(name, include=None)#
Get a Global Administrator user account
- Parameters:
name (str) – Global administrator username
include (list[str]) – List of fields to retrieve, defaults to [‘name’]
- Returns:
The user account, including the requested fields
- list_admins(include=None)#
List local administrators
- Parameters:
include (list[str]) – List of fields to retrieve, defaults to [‘name’]
- Returns:
Iterator for local administrators
- Return type:
cterasdk.lib.iterator.Iterator
- modify(current_username, new_username=None, email=None, first_name=None, last_name=None, password=None, role=None, company=None, comment=None)#
Modify a Global Administrator user account
- Parameters:
current_username (str) – The current GlobalAdmin username
new_username (str,optional) – New name
email (str,optional) – E-mail address
first_name (str,optional) – First name
last_name (str,optional) – Last name
password (str,optional) – Password
role (cterasdk.core.enum.Role,optional) – User role
company (str,optional) – Company name
comment (str,optional) – Comment