<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: storageUsage and storageQuota in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783799#M1297</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P data-aura-rendered-by="303:25548;a" style="color: #3e3e3c; background-color: #ffffff;"&gt;I understand the documentation does not make this very clear, but&amp;nbsp;this property&amp;nbsp;is used to return the total used space in the organization. This is why the same number is returned for each user you call it on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a workaround, one of my colleagues created the below code snippet to determine user storage usage by adding up the size of all the items they own:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;# Accounts is a list of all user objects that you can query&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;Accounts = gis.users.search(query= None, max_users =500)&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;# For each user in the org, give me a list of the items they own&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;for user in Accounts:&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;storage = 0&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;userItems = user.items(max_items=100) # The max_items default is 100&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;if userItems: # Checks to see if the user owns items&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;for item in userItems:&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;# Adds up the total storage of all items the user owns, in bytes&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;storage += item.size&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;print (user.username + " is using {0} bytes of storage".format(storage))&lt;/P&gt;&lt;PRE data-aura-rendered-by="303:25548;a"&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feel free to reach out with any questions!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/230198"&gt;storageUsage and storageQuota&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 May 2020 15:13:39 GMT</pubDate>
    <dc:creator>JillianRizzo</dc:creator>
    <dc:date>2020-05-19T15:13:39Z</dc:date>
    <item>
      <title>storageUsage and storageQuota</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783796#M1294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm looping through all users in our org to gather info for a dashboard.&amp;nbsp; I've noticed that on all users the storageUsage is the same along with storageQuota for each users.&amp;nbsp; All other results - role, created, modified, level, etc are all returning correct values for each users.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I'm using users.get(id) to pull info.&amp;nbsp; GIS is logged in under an admin account.&amp;nbsp; Expecting storageUsage to be different depending on user content loaded into online. But again the storageUsage is all the same for each user.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this expected? or am I doing something/thinking wrong?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 12 Mar 2019 13:04:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783796#M1294</guid>
      <dc:creator>AndrewAdamson</dc:creator>
      <dc:date>2019-03-12T13:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: storageUsage and storageQuota</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783797#M1295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any update on this? I'm seeing the same output. Was this confirmed as a bug?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Dec 2019 13:57:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783797#M1295</guid>
      <dc:creator>ThomasColson</dc:creator>
      <dc:date>2019-12-31T13:57:07Z</dc:date>
    </item>
    <item>
      <title>Re: storageUsage and storageQuota</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783798#M1296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm seeing this behaviour in 10.6 portal but not on ArcGIS Online.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jan 2020 11:05:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783798#M1296</guid>
      <dc:creator>JonathanDawe1</dc:creator>
      <dc:date>2020-01-29T11:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: storageUsage and storageQuota</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783799#M1297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P data-aura-rendered-by="303:25548;a" style="color: #3e3e3c; background-color: #ffffff;"&gt;I understand the documentation does not make this very clear, but&amp;nbsp;this property&amp;nbsp;is used to return the total used space in the organization. This is why the same number is returned for each user you call it on.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;As a workaround, one of my colleagues created the below code snippet to determine user storage usage by adding up the size of all the items they own:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;# Accounts is a list of all user objects that you can query&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;Accounts = gis.users.search(query= None, max_users =500)&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;# For each user in the org, give me a list of the items they own&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;for user in Accounts:&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;storage = 0&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;userItems = user.items(max_items=100) # The max_items default is 100&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;if userItems: # Checks to see if the user owns items&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;for item in userItems:&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;# Adds up the total storage of all items the user owns, in bytes&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;storage += item.size&lt;/P&gt;&lt;P style="padding-left: 90px;"&gt;print (user.username + " is using {0} bytes of storage".format(storage))&lt;/P&gt;&lt;PRE data-aura-rendered-by="303:25548;a"&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Feel free to reach out with any questions!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/230198"&gt;storageUsage and storageQuota&lt;/A&gt;‌&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 May 2020 15:13:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/storageusage-and-storagequota/m-p/783799#M1297</guid>
      <dc:creator>JillianRizzo</dc:creator>
      <dc:date>2020-05-19T15:13:39Z</dc:date>
    </item>
  </channel>
</rss>

