Skip to main content

Unofficial Zscaler API python SDK for ZIA, ZPA, ZDX, and ZCC

Project description

Unofficial Zscaler API talkers

API Talkers

ZIA API Talker

Python classes to leverage Zscaler Internet Access API

The ZIA API talker is divided into two Class objects: ZiaTalker and ZiaPortalTalker. ZiaTalker interacts with ZIA via the published APIs; whereas ZiaPortalTalker interacts with ZIA via the URLs presented in the Portal (aka, the ZIA configuration website).

ZPA API Talker

Python classes to leverage Zscaler Private Access API

The ZPA API talker is divided into two Class objects: ZpaTalker and ZpaPortalTalker. ZpaTalker interacts with ZPA via the published APIs; whereas ZpaPortalTalker interacts with ZPA via the URLs presented in the Portal (aka, the ZPA configuration website).

ZCC API Talker

A Python class to leverage Zscaler Client Connector API. (Currently in Beta status.)

The ZCC API talker is accessed via the Class object named: ZccTalker

ZDX API Talker

A Python class to leverage Zscaler Digital Experience API. (Currently in development.)

This class is interacts with ZDX via the URLs presented in the Portal (aka, the ZDX configuration website). It is named: ZdxPortalTalker

Installation

Option 1: Run within a Docker Container

We provide two methods to build a Docker container. Either using the code hosted on GitHub or the code published to PyPi.

GitHub Method

  1. Download Dockerfile
    • Linux: curl -O https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/git_version.Dockerfile
    • Windows: wget -O Dockerfile https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/git_version.Dockerfile
  2. Build Image and Run Container
    1. docker build -f git_version.Dockerfile -t zscaler_api_talkers .
    2. docker run -it zscaler_api_talkers bash
  3. Usage (program is in /zscaler_api_talkers/)
    • cd zscaler_api_talkers

PyPi Method

  1. Download Dockerfile
    • Linux: curl -O https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/Dockerfile
    • Windows: wget -O Dockerfile https://raw.githubusercontent.com/sergitopereira/zscaler_api_talkers/sergiodevelop/Dockerfile
  2. Build Image and Run Container
    1. docker build -t zscaler_api_talkers .
    2. docker run -it zscaler_api_talkers bash
  3. Usage (program is in /zscaler_api_talkers/)
    • cd zscaler_api_talkers

Option 2: Run in a Python Virtual Environment

  1. Create a virtual Environment: python3 -m venv .zs_api_talkers
  2. Activate virtual environment:
    • Linux: source .zs_api_talkers/bin/activate
    • Windows: .\.zs_api_talkers\Scripts\activate
  3. Install Zscaler API talkers: pip install zscaler-api-talkers

Zscaler Secure Internet and SaaS Access SDK

Usage ZiaTalker

from zscaler_api_talkers import ZiaTalker
zia=ZiaTalker('<Zscaler Cloud Name>')
zia.authenticate(apikey='API_KEY', username='USERNAME', password='PASSWORD')
zia.list_urlcategories()
zia.list_users()
# To view all methods available
print(dir(zia))

Usage ZiaTalker with OAUTH2.0

from zscaler_api_talkers import ZiaTalker
a=ZiaTalker('<Zscaler Cloud Name>', '<Bear oauth2.0 token>')
a.list_url_categorie.url_categories()
a.list_users()
# To view all methods available
print(dir(a))

Zscaler Secure Private Access SDK

Usage ZpaTalker

from zscaler_api_talkers import ZpaTalker
a=ZpaTalker('customerID')
a.authenticate(client_id='clientID',client_secret='clientSecret')
# To view all methods available
print(dir(a))

Zscaler Client Connector SDK

Usage ZccTalker

from zscaler_api_talkers import ZccTalker
a=ZccTalker('<Zscaler Cloud Name>')    
a.authenticate(clientid='clientID',secretkey='clientSecret')
a.list_devices('companyID')
a.list_OTP('companyID','user device id')
# To view all methods available
print(dir(a))

Zscaler Digital Experience SDK

Usage ZdxTalker

from zscaler_api_talkers import ZdxTalker
a=ZdxTalker(username='<username>', password='<password>', zia_cloud='<zia_cloud_domain>')
result = a.get_alerts()
print(result.json())
print(dir(a))

Usage examples

Bugs and enhancements

Feel free to open an issues using GitHub Issues

Author

Sergio Pereira: Zscaler Professional Services

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zscaler_api_talkers-4.1.1.tar.gz (33.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zscaler_api_talkers-4.1.1-py3-none-any.whl (38.5 kB view details)

Uploaded Python 3

File details

Details for the file zscaler_api_talkers-4.1.1.tar.gz.

File metadata

  • Download URL: zscaler_api_talkers-4.1.1.tar.gz
  • Upload date:
  • Size: 33.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.5.1 CPython/3.11.4 Darwin/21.6.0

File hashes

Hashes for zscaler_api_talkers-4.1.1.tar.gz
Algorithm Hash digest
SHA256 ce9ea86e1572befdd508c8b6ab77d6840a4a2b0e6701440b0799a0341f2acb9f
MD5 712a8db76c86b71a5c62bd8e0d1a9d65
BLAKE2b-256 8a336b94d94fb0651928127cef55641c679db20c059c12b3b67d1554aa6a65c6

See more details on using hashes here.

File details

Details for the file zscaler_api_talkers-4.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for zscaler_api_talkers-4.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 249cb981d17ea8e51af71430f4e34f1422511560332fc9f4c37acbe3844d524a
MD5 4638dc213fda30c3ef7d7b1225264ce7
BLAKE2b-256 517929587e35c3f5acdfdd37025d51c6a00e062ee84d89ff6e21407421f84078

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page