Zscaler Client Connector API - Issues


I have got a lots of problems with this API:

  • RateLimiting: it is too low to implement any process.

  • GetDevices: It does not bring all the information, and if you have a long list of devices (+50000) it fails too many times.

The Zscaler solution was the new endopint /public/v1/downloadDevices. In this endpoint you can get a CSV con all devices, the problem is that I am only able to download a few fields. For example I need:

  • ZCC Versions.
  • All timestamps
  • Policy

And in the CSV only appears:

Device type
Device model
Mac Address
Company Name
OS Version
OS Type

Can someone work fine with a large group of devices?

Im seeing similar problems. I was able to initially get the downloadDevices to work, but after a few tests it doesnt return any results. I contacted support to see if it was a rate limit issue, but its the next day and still not working. For the getDevices API call I get most of what I need but it looks like the maximum record count is 5K and I have 18K devices. I cant figure out how to pull additional pages, or pull all devices since if I dont specify a device count it returns 50, and if I put in 18000 it returns 5K.

Im not much of a programmer but here is what I have for the getDevices in a Python script. This one has a pageSize of 20000 which still only returns 5000:


import requests
import json
import csv
from datetime import date
import pandas as pd

#API Call to get temporary Token
url = “https://api-mobile.zscloud.net/papi/auth/v1/login
headers = {
‘Content-type’: ‘application/json’
response = requests.request(“POST”, url, headers=headers, json=payload)

jwtTokenOutput = json.loads(response.text)
TOKEN = jwtTokenOutput[‘jwtToken’]

#API Call to pull enrolled devices using Token for basic device information
url = “https://api-mobile.zscloud.net/papi/public/v1/getDevices?pageSize=20000
headers = {

ZCCresponse = requests.request(“GET”, url, headers=headers)

#Write JSON to a CSV
today = date.today()
str_today = str(today)
csvFile_today = “ZCC_getDevices_”+str_today+“.csv”
df = pd.read_json(ZCCresponse.text)
df.to_csv(csvFile_today, index=False)

1 Like