API Endpoint(s) and/or Zoom API Event(s)
There are a couple of issues we are seeing on our end while using the List Devices endpoint.
The first Issue we’re having with getting devices is the discrepancy between the total records received from the API call, the total records the API call says we should have, and the total records that are displayed in the web under the Zoom Device Managment portal.
For example, when getting online devices we call the API Endpoint listed above while also passing parameters such as page_size (the default value is 30 and the max value allowed is 300), and device_status (which in our case is 1 to represent the online status). If we have more than one page in the response we then pass on the next_page_token parameter to subsequent pages (which is different after each call) in order to get the next page and array of devices corresponding to that page.
In the example below we used our node app with axios to automate the retrieval of all entities by scrolling automatically through the pages and logging the output per page as well as total in the end. Here is the first call for online devices using 300 as the page size input:
Notice how the devices array count does not equal the page size of 300 passed in, and at the end the total devices we should have do not equal total records.
I repeated the same call but passed in 50 as the page size instead to check for any differences in that regard:
With the page_size parameter set to 50 it looks like we have a more accurate device count per page, but the totals are still are incorrect.
Not only is the number between the Total Records of what we should have according to the API different than what we actually received (629 vs 621), but the Total Records is also different than the total that shows up in the ZDM portal. Here is a screenshot of the total devices that show up when filtering based on online status in the Device Managment table:
So really according to the Device Management table we should actually have 651 total devices.
|Source||Online Device Count|
|Zoom Device Management Table||651|
|total_records property from API call||629|
|sum of devices array length from each page||621|
In summary, some devices count based on page size are wrong in some pages, there is a discrepancy between total records number and sum of the length of devices array, and there is also a discrepancy between total records number and Device Management table total devices count.
The second issue I noticed is that when using the same endpoint to GET offline devices we are unable to retrieve more than 185 records, whether that’s in a single page call or after you hit a certain page number. The issue is very unclear and the error message makes no sense at all. Using the same node project here is a screenshot of the attempt at getting offline messages. With a page size of 300:
With a page size of 50:
Now using a page size of 37 (which is a factor of 185 and we expect it to error out after the 5th page because 185 / 37 = 5):
As you can see we are unable to retrieve more than 185 devices for some odd reason and the error message we get back from zoom makes no sense at all.
In summary, for offline devices we are unable to use the API endpoint to get devices past a count of 185. It’s also worth mentioning the total records count is incorrect and different than what Zoom Device Manager shows for offline devices.
Disclaimer: It’s also worth mentioning that we repeated these steps manually with Postman to verify it wasn’t a rapid iteration of calls that was causing the issue.