Skip to main content

DeviceDetail

Device Detail 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. Any other action listed below is a custom action that takes explicit keyword arguments and returns a value.

Quick Start​

import zssdk
import logging

# Enable debug logging for DeviceDetail
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 DeviceDetail
resource = session.zdx.DeviceDetail(id="your-resource-id")
resource.load()
print(resource)

# Debug output shows HTTP request/response details

Identifiers​

NameTypeDescription
idstringUnique identifier

Actions​

get_device_app_probe_cloud_path_network_metrics()​

Gets the CloudPath Probe’s metric trend on a device for an application. For Cloud Path Probes, you can access latency metrics for End to End, Client - Egress, Egress - Application, ZIA Service Edge- Egress, and ZIA Service Edge - Application. If not specified, it defaults to End to End latency. If the time range is not specified, the endpoint defaults to the last 2 hours.

Parameters:

NameTypeRequiredDescription
app_idlongYes-
probe_idlongYes-
fromlongNo-
tolongNo-

Returns: NetworkStats

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.get_device_app_probe_cloud_path_network_metrics(app_id=3600, probe_id=3600)
print(result)

load()​

Gets the device details including the device model information, tunnel type, network, and software details. The JSON must contain the user ID and email address to associate the device to a user. If the time range is not specified, the endpoint defaults to the last 2 hours.

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

Returns: DeviceDetail

Example:

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

get_device_app_metrics()​

Gets the application’s ZDX score trend for a device. If the time range is not specified, the endpoint defaults to the last 2 hours.

Parameters:

NameTypeRequiredDescription
app_idlongYes-
fromlongNo-
tolongNo-

Returns: Series

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.get_device_app_metrics(app_id=3600)
print(result)

create_device_deep_traces()​

Start deep trace on a device. Limited to 1 active session on a device at any time. Overall 15 active sessions at any point of time across all devices - includes sessions initiated from UI.

Parameters:

NameTypeRequiredDescription
session_namestringNo-
app_idlongNo-
web_probe_idlongNo-
cloudpath_probe_idlongNo-
session_length_minuteslongNo-
probe_devicebooleanNo-

Returns: DeepTraceResponse

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.create_device_deep_traces()
print(result)

get_device_deep_trace()​

Get deeptrace status

Parameters:

NameTypeRequiredDescription
trace_idstringYes-

Returns: DeepTraceSession

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.get_device_deep_trace(trace_id="resource-id")
print(result)

delete_device_trace()​

Delete the deep trace session and the associated data

Parameters:

NameTypeRequiredDescription
trace_idstringYes-

Returns: DeeepTraceDeleteResponse

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.delete_device_trace(trace_id="resource-id")
print(result)

get_device_trace_cloud_path_metrics()​

Get cloudpath metrics (latency, packet drops, etc.) from deeptrace session

Parameters:

NameTypeRequiredDescription
trace_idstringYes-

Returns: NetworkStats

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.get_device_trace_cloud_path_metrics(trace_id="resource-id")
print(result)

get_device_trace_events()​

Gets the Events metrics trend for a device. The event metrics include Zscaler, Hardware, Software and Network event changes.

Parameters:

NameTypeRequiredDescription
trace_idstringYes-

Returns: DeviceEvents

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.get_device_trace_events(trace_id="resource-id")
print(result)

get_device_trace_top_processes()​

Get top processes from the deep tracing session

Parameters:

NameTypeRequiredDescription
trace_idstringYes-

Returns: ImpactedProcessSeries

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.get_device_trace_top_processes(trace_id="resource-id")
print(result)

list_device_events()​

Gets the Events metrics trend for a device. If the time range is not specified, the endpoint defaults to the last 2 hours. The event metrics include Zscaler, Hardware, Software and Network event changes.

Parameters:

NameTypeRequiredDescription
fromlongNo-
tolongNo-

Returns: DeviceEvents

Example:

resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.list_device_events()
print(result)

Attributes​

NameTypeRequiredDescription
idlongNo-
namestringNo-
hardwareDeviceDetailHardwareNo-
networkDeviceDetailNetworkCollectionNo-
softwareDeviceDetailSoftwareNo-