DeviceDetail
Device Detail resource for Zscaler Digital Experience.
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
| Name | Type | Description |
|---|---|---|
id | string | Unique 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:
| Name | Type | Required | Description |
|---|---|---|---|
app_id | long | Yes | - |
probe_id | long | Yes | - |
from | long | No | - |
to | long | No | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
app_id | long | Yes | - |
from | long | No | - |
to | long | No | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
session_name | string | No | - |
app_id | long | No | - |
web_probe_id | long | No | - |
cloudpath_probe_id | long | No | - |
session_length_minutes | long | No | - |
probe_device | boolean | No | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
trace_id | string | Yes | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
trace_id | string | Yes | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
trace_id | string | Yes | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
trace_id | string | Yes | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
trace_id | string | Yes | - |
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:
| Name | Type | Required | Description |
|---|---|---|---|
from | long | No | - |
to | long | No | - |
Returns: DeviceEvents
Example:
resource = session.zdx.DeviceDetail(id="your-resource-id")
result = resource.list_device_events()
print(result)
Attributes
| Name | Type | Required | Description |
|---|---|---|---|
id | long | No | - |
name | string | No | - |
hardware | DeviceDetailHardware | No | - |
network | DeviceDetailNetworkCollection | No | - |
software | DeviceDetailSoftware | No | - |
Related
- DeviceDetail - Data structure definition
- Logging guide - enable verbose logs while debugging this resource