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

Zscaler ZPA Machine Groups API

Overview

Machine Groups are used in ZPA to identify individual devices that will connect to ZPA via tunnel before the user has logged-in to Windows.

At the time of publication there are no public API methods to create, modify or delete a Machine Group in ZPA. You’ll need to create Machine Groups in the UI before you can access that data via the API using pyZscaler.

References

Class Methods

The pyZscaler Machine Groups Class can be accessed via zpa.machine_groups.

The following methods are supported by pyZscaler for ZPA Machine Groups:

Getting information on a ZPA Machine Group

This section details how you get information on a Machine Group in ZPA using pyZscaler.

Class Methods used

  • get_machine_group()

Prerequisites

You’ll need the id of the Machine Group that you want to get information on.

Example

Print information on a Machine Group with an id of 916196382959075882.

from pyzscaler.zpa import ZPA

with ZPA() as zpa:
    
    # Print information on an Machine Group with id 916196382959075882
    pprint(zpa.machine_groups.get_machine_groups('916196382959075882'))

Listing all ZPA Machine Groups

This section details how you can list all Machine Groups in ZPA using pyZscaler.

Class Methods used

  • list_machine_groups()

Example

Iterate through all Machine Groups and print each Machine Group.

from pyzscaler.zpa import ZPA

with ZPA() as zpa:
    
    # Iterate Machine Groups and print each one
    for machine_group in zpa.machine_groups.list_machine_groupss():
        pprint(machine_group)