Skip to main content

User

User resource for Zscaler Digital Experience.

Resource operations

This resource supports the following standard methods: load(). They operate on the instance state — set properties with dot notation, then call the method with no arguments.

Quick Start​

import zssdk
import logging

# Enable debug logging for User
logging.getLogger('zssdk.zdx').setLevel(logging.DEBUG)
logging.basicConfig(level=logging.DEBUG)

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

# Get a specific User
resource = session.zdx.User(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

load()​

Gets user details including the device information, active geolocations, and Zscaler locations. If the time range is not specified, the endpoint defaults to the last 2 hours.

Fetches an existing User by id. Only the id identifier is required; load() takes no other arguments.

Returns: User

Example:

resource = session.zdx.User(id="your-resource-id")
resource.load()
print(resource.name)

Attributes​

NameTypeRequiredDescription
idlongNo-
namestringNo-
emailstringNo-
scoreintegerNo-
devicesUserDeviceInfoCollectionNo-
  • User - Data structure definition
  • Logging guide - enable verbose logs while debugging this resource