<?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: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826692#M3041</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is possible. I've posted an example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis

url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"your organization url"&lt;/SPAN&gt;
username &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" your username"&lt;/SPAN&gt;
password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"your password"&lt;/SPAN&gt;
item_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"feature name"&lt;/SPAN&gt;

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
item_id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item_size &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; item_id&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;size&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1024&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1024&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_size&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;The above show the result in MB. If you want to print the size in bytes, just remove the two divisions in item_size.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 09:57:13 GMT</pubDate>
    <dc:creator>NikolajGrønholdt</dc:creator>
    <dc:date>2021-12-12T09:57:13Z</dc:date>
    <item>
      <title>Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826691#M3040</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Would this be possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If so, can someone provide an example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2019 16:48:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826691#M3040</guid>
      <dc:creator>PatrickFilyer</dc:creator>
      <dc:date>2019-02-13T16:48:53Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826692#M3041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, it is possible. I've posted an example below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis

url &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"your organization url"&lt;/SPAN&gt;
username &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;" your username"&lt;/SPAN&gt;
password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"your password"&lt;/SPAN&gt;
item_name &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"feature name"&lt;/SPAN&gt;

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_name&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
item_id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
item_size &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; item_id&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;size&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1024&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;/&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;1024&lt;/SPAN&gt;

&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_size&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;SPAN style="color: #cc7832;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;The above show the result in MB. If you want to print the size in bytes, just remove the two divisions in item_size.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:57:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826692#M3041</guid>
      <dc:creator>NikolajGrønholdt</dc:creator>
      <dc:date>2021-12-12T09:57:13Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826693#M3042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you very much&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 14:28:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826693#M3042</guid>
      <dc:creator>PatrickFilyer</dc:creator>
      <dc:date>2019-02-19T14:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826694#M3043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just a note of caution, the provided code will not always produce accurate sizes for GIS services in Portal.&amp;nbsp; I have found that when a GIS service is hosted in a data store tied to one of the additional GIS server roles, e.g., spatiotemporal data store registered with GeoAnalytic Server, the size is returned as 0 or some very small number that likely represents metadata size and not actual data size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 16:58:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826694#M3043</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-02-19T16:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826695#M3044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I will keep this in mind.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Feb 2019 16:59:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826695#M3044</guid>
      <dc:creator>PatrickFilyer</dc:creator>
      <dc:date>2019-02-19T16:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826696#M3045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for the heads up Joshua. I was not aware of that. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 07:14:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826696#M3045</guid>
      <dc:creator>NikolajGrønholdt</dc:creator>
      <dc:date>2019-02-20T07:14:48Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826697#M3046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Esri's documentation on the size of items in Portal is missing quite a few important footnotes.&amp;nbsp; At best, the documentation is misleading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When an item is loaded into Portal, a&lt;SPAN style="font-family: courier new, courier, monospace;"&gt; item.pkinfo&lt;/SPAN&gt; file is created along with other files.&amp;nbsp; The file holds metadata about what is being loaded into Portal, including size information.&amp;nbsp; I haven't dove into the weeds enough to know whether Portal is creating the file or the client creates it and passes it to Portal, but I think the latter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For GIS services hosted in Portal, e.g., feature layer, map image layer, etc..., Portal &lt;SPAN style="text-decoration: underline;"&gt;does not&lt;/SPAN&gt; communicate with the data stores to determine the size of the GIS service.&amp;nbsp; The size value that shows up in Portal and through REST appears to be nothing more than what is recorded in &lt;SPAN style="font-family: courier new, courier, monospace;"&gt;item.pkinfo&lt;/SPAN&gt;.&amp;nbsp; If a GIS service is created by uploading another file to Portal, like creating a feature layer from service definition file, the size value for the GIS service is inherited from the size value from the service definition file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For tools that create a GIS service directly without uploading a file to Portal first, like Copy to Data Store with GeoAnalytic Server, there is no size value to inherit so it seems to get set to -1 which gets converted to 0 KB.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Data size can be tricky if one wants to split hairs.&amp;nbsp; The same data set stored as a shape file will be larger than when stored as a feature class in a file geodatabase, and a feature class in a file geodatabase can be smaller or larger on different systems depending on cluster sizes of file systems.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For GIS services hosted in Portal, the important take home is that the reported size information does not reflect the physical size of that service in the data store.&amp;nbsp; At best, the size value returned approximates the size of the GIS service in the data store, and at worst it is simply wrong.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Feb 2019 16:43:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826697#M3046</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-02-20T16:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Possible to get Feature Layer/Tile Layer Storage Size with the ArcGIS API for Python</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826698#M3047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The above code works for an individual user within an organisations account.&lt;/P&gt;&lt;P&gt;I have modified the code to return all layers belonging to an individual user i.e. myself.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is it possible to return the sizes for all users and their layers as well?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks very much.&lt;/P&gt;&lt;P&gt;Richard.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 Jun 2019 08:05:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/possible-to-get-feature-layer-tile-layer-storage/m-p/826698#M3047</guid>
      <dc:creator>GISUser17</dc:creator>
      <dc:date>2019-06-14T08:05:25Z</dc:date>
    </item>
  </channel>
</rss>

