Skip to main content

Digital Experience SDK

This article outlines the Zscaler Python SDK resources you can use to manage Zscaler Digital Experience (ZDX) features programmatically, with code examples.

Quick Start​

import zssdk

session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)

# Access Digital Experience service
zdx = session.zdx

Available Resources​

Access individual resources using the has pattern:

ResourceDescription
ActiveGeoLocationActive Geo Location resource
DepartmentDepartment resource
AlertDetailsAlert Details resource
YEngineAnalysisResultY Engine Analysis Result resource
ConfigApplicationRespConfig Application Resp resource
AppDetailApp Detail resource
CollectionCollection resource
ConfigDeviceConfig Device resource
UserInfoUser Info resource
ConfigDepartmentConfig Department resource
DeviceDetailDevice Detail resource
GroupGroup resource
SoftwareInventorySoftware Inventory resource
LocationGroupLocation Group resource
LocationLocation resource
...6 more resources

Collections​

List resources using the hasMany pattern:

CollectionResource Type
active_geo_locationsActiveGeoLocation
locationsLocation
departmentsDepartment
historical_alertsAlert
ongoing_alertsAlert
supported_os_typesEntity
supported_providersProviderResponse
application_summariesConfigApplication
predefined_applicationsPredefinedApplicationResp
config_application_respsConfigApplicationResp
app_detailsAppDetail
collectionsCollection
config_devicesConfigDevice
user_infosUserInfo
config_department_summariesEntityResponse

Example: CRUD Operations​

import zssdk

session = zssdk.Session(
vanity_domain="your-vanity-domain",
client_id="your-client-id",
client_secret="your-client-secret",
)

# Create
resource = session.zdx.ActiveGeoLocation()
resource.name = "value"
resource.create()

# Read
resource = session.zdx.ActiveGeoLocation(id=resource.id)
resource.load()
print(resource.name)

# Update
resource.name = "Updated value"
resource.update()

# Delete
resource.delete()

Example: List Resources​

# List all resources
for item in session.zdx.active_geo_locations():
print(f"{item.id}: {item.name}")