Package: zscaler-api-talkers
Unofficial Zscaler API talkersAPI TalkersZIA API TalkerPython classes to leverageZscaler Internet Access APIZPA API TalkerPython classes to leverageZscaler Private Access APIClient Connector API TalkerA Python class to leverage Zscaler Client Connector API. (Currently in Beta status.)The Client Connector API talker is accessed via the Class object named:ClientConnectorTalkerZDX API TalkerA Python class to leverage Zscaler Digital Experience API. (Currently in development.)This class interacts with ZDX via the URLs presented in the Portal (aka, the ZDX configuration website).  It is
named:ZdxPortalTalkerCloud and Branch Connector API TalkerA Python class to leverage Cloud and Branch Connector API. (Currently in development.)This class interacts with the Cloud and Branch Connector Portal. The class object is namedCloudConnectorTalker(https://help.zscaler.com/cloud-branch-connector/about-zscaler-cloud-branch-connector-api)InstallationOption 1: Run in a Python Virtual EnvironmentCreate a virtual Environment:python3 -m venv .zs_api_talkersActivate virtual environment:Linux:source .zs_api_talkers/bin/activateWindows:.\.zs_api_talkers\Scripts\activateInstall Zscaler API talkers:pip install zscaler-api-talkersOption 2: Run within a Docker ContainerWe provide two methods to build a Docker container.  Either using the code hosted on GitHub or the code published to PyPi.PyPi MethodDownload DockerfileLinux:curl -O https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/DockerfileWindows:wget -O Dockerfile https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/DockerfileBuild Image and Run Containerdocker build -t zscaler_api_talkers .docker run -it zscaler_api_talkers bashUsage (program is in /zscaler_api_talkers/)cd zscaler_api_talkersGitHub MethodDownload DockerfileLinux:curl -O https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/git_version.DockerfileWindows:wget -O Dockerfile https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/git_version.DockerfileBuild Image and Run Containerdocker build -f git_version.Dockerfile -t zscaler_api_talkers .docker run -it zscaler_api_talkers bashUsage (program is in /zscaler_api_talkers/)cd zscaler_api_talkersZscaler Secure Internet and SaaS Access SDKUsage ZiaTalkerfromzscaler_api_talkersimportZiaTalkerzia=ZiaTalker('<Zscaler Cloud Name>')zia.authenticate(apikey='API_KEY',username='USERNAME',password='PASSWORD')zia.list_urlcategories()zia.list_users()# To view all methods availableprint(dir(zia))Usage ZiaTalker with OAUTH2.0fromzscaler_api_talkersimportZiaTalkera=ZiaTalker('<Zscaler Cloud Name>','<Bear oauth2.0 token>')a.list_url_categorie.url_categories()a.list_users()# To view all methods availableprint(dir(a))Zscaler Secure Private Access SDKUsage ZpaTalkerfromzscaler_api_talkersimportZpaTalkera=ZpaTalker('customerID')a.authenticate(client_id='clientID',client_secret='clientSecret')# To view all methods availableprint(dir(a))Zscaler Client Connector SDKUsage ClientConnectorTalkerfromzscaler_api_talkersimportClientConnectorTalkera=ClientConnectorTalker('<Zscaler Cloud Name>')a.authenticate(clientid='clientID',secretkey='clientSecret')a.list_devices('companyID')a.list_OTP('companyID','user device id')# To view all methods availableprint(dir(a))Zscaler Cloud & Branch Connector SDKUsage CloudConnectorTalkerfromzscaler_api_talkersimportCloudConnectorTalkerbac=CloudConnectorTalker(cloud_name='<ZScaler Cloud Name>',api_key='API_KEY',username='USERNAME',password='PASSWORD')bac.list_cloud_branch_connector_groups()bac.delete_cloud_branch_connector_vm(group_id='GROUPID',vm_id='VMID')print(dir(bac))Usage exampleshttps://github.com/sergitopereira/zscaler_api_talkers#usage-examplehttps://github.com/sergitopereira/zscaler_api_talkers/blob/main/example.pyBugs and enhancementsFeel free to open an issues usingGitHub IssuesAuthorSergio Pereira: Zscaler Professional Services