diskVolumeReports not matching admin console

15 views
Skip to first unread message

ADKAaron

unread,
Nov 10, 2022, 1:44:41 PM11/10/22
to Google Apps Script Community
Hello all. I have the following code:
cb = AdminDirectory.Chromeosdevices.get('my_customer', id)
      
      freeSpace = 0
      totalSpace = 0

      for(var j=0; j < cb.diskVolumeReports[0].volumeInfo.length; j++){
        freeSpace += parseInt(cb.diskVolumeReports[0].volumeInfo[j].storageFree)
        totalSpace += parseInt(cb.diskVolumeReports[0].volumeInfo[j].storageTotal)
      }
      var usedSpace = totalSpace - freeSpace
      hd = usedSpace / totalSpace

Debugging it, it appears to be working correctly with the data that is returned from the Get on the specific Chromebook. The problem is that the values do not match what I see in admin console. Is this a bug or possibly a permissions issue where I can't pull down ALL the available data?

Thanks,
-Aaron

Scott Harpster

unread,
Mar 31, 2023, 3:10:47 PM3/31/23
to Google Apps Script Community
same issue we are seeing
Reply all
Reply to author
Forward
0 new messages