Method Documentation¶
The main SDK object by which all other methods are accessed is created by
calling py42.sdk.from_local_account
. For example:
import py42.sdk
sdk = py42.sdk.from_local_account("console.us.code42.com", "john.doe@example.com", "my_pw")
# access properties on 'sdk' to explore all the available methods
Important
py42 cannot be used with SAML or Sigle Sign-On based accounts such as Okta or Active Directory. Only accounts that are added by having an administrator create them within the Code42 console are currently supported.
Explore the complete public documentation for py42
below.
-
py42.sdk.
from_local_account
(host_address, username, password)¶ Creates a
SDKClient
object for accessing the Code42 REST APIs using the supplied credentials. Currently, only accounts created within the Code42 console or using the APIs (including py42) are supported. Username/passwords that are based on Active Directory, Okta, or other Identity providers cannot be used with this method.- Parameters
host_address (str) – The domain name of the Code42 instance being authenticated to, e.g. console.us.code42.com
username (str) – The username of the authenticating account.
password (str) – The password of the authenticating account.
- Returns
-
class
py42.sdk.
SDKClient
(sdk_dependencies)¶ Bases:
object
-
property
alerts
¶ A collection of methods related to retrieving and updating alerts rules.
-
property
archive
¶ A collection of methods for accessing Code42 storage archives. Useful for doing web-restores or finding a file on an archive.
-
property
detectionlists
¶ A collection of properties each containing methods for managing specific detection lists, such as departing employees.
-
property
devices
¶ A collection of methods for retrieving or updating data about devices in the Code42 environment.
-
classmethod
from_local_account
(host_address, username, password)¶ Creates a
SDKClient
object for accessing the Code42 REST APIs using the supplied credentials. Currently, only accounts created within the Code42 console or using the APIs (including py42) are supported. Username/passwords that are based on Active Directory, Okta, or other Identity providers cannot be used with this method.- Parameters
host_address (str) – The domain name of the Code42 instance being authenticated to, e.g. console.us.code42.com
username (str) – The username of the authenticating account.
password (str) – The password of the authenticating account.
- Returns
-
property
legalhold
¶ A collection of methods for retrieving and updating legal-hold matters, policies, and custodians.
-
property
orgs
¶ A collection of methods for retrieving or updating data about organizations in the Code42 environment.
- Returns
-
property
securitydata
¶ - A collection of methods and properties for getting security data such as:
File events
Alerts
Security plan information
-
property
serveradmin
¶ A collection of methods for getting server information for on-premise environments and tenant information for cloud environments.
- Returns
py42.clients.administration.AdministrationClient
-
property
usercontext
¶ A collection of methods related to getting information about the currently logged in user, such as the tenant ID.
- Returns
-
property
users
¶ A collection of methods for retrieving or updating data about users in the Code42 environment.
- Returns
-
property