Git Product home page Git Product logo

zscaler_api_talkers's Introduction

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).

Client Connector API Talker

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

The Client Connector API talker is accessed via the Class object named: ClientConnectorTalker

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 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

Option 2: 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.

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

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

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 ClientConnectorTalker

from zscaler_api_talkers import ClientConnectorTalker
a=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 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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.