Skip to main content

Configuring Deep Tracing Using API

This article provides information on managing Zscaler Digital Experience (ZDX) troubleshooting by using APIs. All APIs are rate limited. To learn more, see ZDX API Rate Limits.

Starting a Deep Trace

To start a deep tracing session on a device, send a POST request to the endpoint /devices/{deviceid}/deeptraces. Provide the device's ID in the request using the deviceid parameter.

For example, in Python:

payload = {
"deviceid":30989301
}

Example response:

{
"trace_id": 0,
"status": "not_started",
"expected_time": 0
}

A successful response returns code 200. To learn more, see ZDX API Codes.

Stopping a Deep Trace

To stop a deep tracing session on a device, send a DELETE request to the endpoint /devices/{deviceid}/deeptraces. Provide the following in the request:

note

This deletes the deep tracing session and the associated data.

  • deviceid: The device's ID.
  • trace_id: The deep tracing ID that requires a stop.

For example, in Python:

payload = {
"deviceid":30989301,
"trace_id":0
}

Example response:

{
"trace_id": 0
}

A successful response returns code 200. To learn more, see ZDX API Codes.

Retrieving a List of All Deep Traces

To get a list of all deep traces on a specific device, send a GET request to the endpoint /devices/{deviceid}/deeptraces. Provide the device's ID in the request using the deviceid parameter.

For example, in Python:

payload = {
"deviceid":30989301
}

Example response:

{
"trace_id": 0,
"trace_details": {
"session_name": "string",
"user_id": 0,
"username": "string",
"device_id": 30989301,
"device_name": "string",
"web_probe_id": 0,
"web_probe_name": "string",
"cloudpath_probe_id": 0,
"cloud_path_name": "string",
"session_length": 0,
"probe_device": true
},
"status": "not_started",
"created_at": 0,
"started_at": 0,
"ended_at": 0
}

A successful response returns code 200. To learn more, see ZDX API Codes.

Retrieving the Deep Tracing Session Configuration

To get the configuration of a Deep Tracing session, send a GET request to the endpoint /devices/{deviceid}/deeptraces/{trace_id}. Provide the following in the request:

  • deviceid: The device's ID.
  • trace_id: The device's deep tracing ID.

For example, in Python:

payload = {
"deviceid":30989301,
"trace_id":0
}

Example response:

{
"trace_id": 0,
"trace_details": {
"session_name": "string",
"user_id": 0,
"username": "string",
"device_id": 30989301,
"device_name": "string",
"web_probe_id": 0,
"web_probe_name": "string",
"cloudpath_probe_id": 0,
"cloud_path_name": "string",
"session_length": 0,
"probe_device": true
},
"status": "not_started",
"created_at": 0,
"started_at": 0,
"ended_at": 0
}

A successful response returns code 200. To learn more, see ZDX API Codes.