Link Search Menu Expand Document
  1. Zscaler ZPA Trusted Networks API
    1. Overview
    2. References
    3. Class Methods
    4. Getting information on a ZPA Trusted Network
    5. Listing all ZPA Trusted Networks

Zscaler ZPA Trusted Networks API

Overview

Trusted Networks are used in ZPA to identify a network that belongs to your organisation. At the time of publication there are no public API methods to create, modify or delete a Trusted Network in ZPA. You’ll need to create the Trusted Network in the UI before you can access that data via the API using pyZscaler.

References

Class Methods

The pyZscaler Trusted Networks Class can be accessed via zpa.trusted_networks.

The following methods are supported by pyZscaler for ZPA Trusted Networks:

Getting information on a ZPA Trusted Network

This section details how you get information on a Trusted Network in ZPA using pyZscaler.

Class Methods used

  • get_network()

Prerequisites

You’ll need the id of the Trusted Network that you want to get information on.

Example

Print information on a Trusted Network with an id of xyz.

from pyzscaler.zpa import ZPA

with ZPA() as zpa:
    
    # Print information on Trusted Network with id 
    pprint(zpa.trusted_networks.get_network(''))

Listing all ZPA Trusted Networks

This section details how you can list all Trusted Networks in ZPA using pyZscaler.

Class Methods used

  • list_networks()

Example

Iterate through all Trusted Networks and print each Trusted Network.

from pyzscaler.zpa import ZPA

with ZPA() as zpa:
    
    # Iterate trusted networks and print each one
    for network in zpa.trusted_networks.list_networks():
        pprint(network)