I am working with the /organizations/{organizationId}/licenses endpoint to retrieve the licenses for a number of organizations and then match them up, based on serial number, with the inventory of the organization to track license expiration dates and devices that need licenses. The script is written and seems to be working for the most part. I am running into the following, which seems a bit odd. For one organization, the number of records being returned by the licenses endpoint in 1204. The number of records being returned by the organization inventory is 1206. When my script is done, most of the devices have the license expiration date, or are just in inventory, so there is no date. I do have 36 records that come back with no license found. When I look in the dashboard at the license information, a number of these devices come up with a license expiration date. Just for fun, I did a test where I made the same API call to /organizations/{organizationId}/licenses, but included the "deviceSerial" parameter and gave it a serial # that I was seeing as having a license in the dashboard, but did not have one from my script run. It came back with the license record, just fine. I then dumped all of the licenses from my normal API call to a file and searched for the serial number, just to make sure that there was not a problem with my search in the script. The serial number was not in the file. So, it seems that when you make a normal API call to /organizations/{organizationId}/licenses (I am passing the perPage as 1000, BTW) it may not be returning all of the license information. Specifying the serial number in the call will return the license record, if there is one. Has anyone run into the same problem or something similar? Another piece of information, this is a Python script making REST calls. I am not using the SDK. The organizations being looked at do have the per device licensing.
... View more