How do I get the actual storage usage of my portal users?

535
1
04-07-2019 04:05 PM
AitorCalero_García
Esri Contributor

Hello, I'm trying to create a script to get the actual storage usage of my portal users. The code I've written is this:

gis = GIS(profile='geogeeks')
user = gis.users.get('aitor.calero.masquemapas')
usrs = gis.users.search('')
for usr in usrs:
print(usr.username + "\t\t:\t" + str((usr.storageUsage/1024)))

However, it always gives me the same size per user:

usuario.invitado : 57075573.77636719
usuarioapps04 : 57075573.77636719
usuarioapps05 : 57075573.77636719
usuarioapps06 : 57075573.77636719
usuarioapps10 : 57075573.77636719
usuarioapps15 : 57075573.77636719

Am I doing something wrong? I've also noticed that the size comes in bits. I will be great if you can get it in MB, KB, GB, etc by passing a parameter.

Tags (3)
0 Kudos
1 Reply
JoshuaBixby
MVP Esteemed Contributor

In this case, ArcGIS API for Python is simply passing along the bogus values being generated by ArcGIS REST API.  You might want to ask your question overArcGIS REST API

I say "bogus values" because either the numbers are incorrect of Esri's definition of storageUsage is something very different than what nearly everyone thinks.