<?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: How do you export a public service item from another organization? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848251#M3757</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No worries Bruce.&lt;/P&gt;&lt;P&gt;Although the open data website provides download function on the interface but it does not provide an API for people who want to do it programmatically.&lt;/P&gt;&lt;P&gt;Why not&amp;nbsp;use the service as a direct datasource?&amp;nbsp; you can query it using "&lt;A class="link-titled" href="http://gis4.dfwmaps.com/arcgis/rest/services/rdc/rdc_Census/MapServer/14/query?outFields=*&amp;amp;where=1%3D1" title="http://gis4.dfwmaps.com/arcgis/rest/services/rdc/rdc_Census/MapServer/14/query?outFields=*&amp;amp;where=1%3D1"&gt;http://gis4.dfwmaps.com/arcgis/rest/services/rdc/rdc_Census/MapServer/14/query?outFields=*&amp;amp;where=1%3D1&lt;/A&gt;&amp;nbsp;" , and with the query it is completely possible to create a shapefile using ArcPy if you really need it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Aug 2018 00:19:43 GMT</pubDate>
    <dc:creator>simoxu</dc:creator>
    <dc:date>2018-08-17T00:19:43Z</dc:date>
    <item>
      <title>How do you export a public service item from another organization?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848248#M3754</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Using item.export &lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html?highlight=export#arcgis.gis.Item.export" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html?highlight=export#arcgis.gis.Item.export" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis.gis module — arcgis 1.4.2 documentation&lt;/A&gt; I'm able to download data to a zip file from a feature service like this (I''m the item owner and an admin on the site):&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;*&lt;/SPAN&gt;

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;username&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"user_name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"password"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
data_item_id &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"abcde12345"&lt;/SPAN&gt;

data_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;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;data_item_id&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
output_file &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; data_item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;export&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;title&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;data_item_id&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;export_format&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Shapefile"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;wait&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
output_file&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;download&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;save_path &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"D:\\temp\\data\\"&lt;/SPAN&gt;&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The documentation states: "Available only to users with an organizational subscription. Invokable only by the service item owner or an administrator."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I export data from a public feature service item available from an organization of which I am not a member?&amp;nbsp; The data are available from an Open Data site and I can choose 'Download' using the web page but how do I export the data using the Python API?&amp;nbsp; I have a number of items I would like to download.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for any help.&amp;nbsp; I'm stuck.&lt;/P&gt;&lt;P&gt;-Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:25:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848248#M3754</guid>
      <dc:creator>BruceGodfrey</dc:creator>
      <dc:date>2021-12-12T10:25:41Z</dc:date>
    </item>
    <item>
      <title>Re: How do you export a public service item from another organization?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848249#M3755</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There are 3 functions that I can think of in response to your&amp;nbsp;question: &lt;STRONG&gt;export&lt;/STRONG&gt;, &lt;STRONG&gt;download&lt;/STRONG&gt; and create &lt;STRONG&gt;replica&lt;/STRONG&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. If you want to use export, you need to be a named user. by default, you can only download your own items or others' items in your organisation if you have the administrator privilege, it is also possible to export others' item if they "allow others to export to different formats". But anyway, I don't think you can export the items in another organisation if you are not a part of that organisation. It sort of make sense that you only can export when you are inside of an org, and when you are outside of an org, you can only "import" its items ...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. You can download items if they are downloadable, for example, shape files, all sorts of packages (layer, project...), etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. The last one is my favorite, replica. you can checkout feature layers in different formats by creating a replica if the sync is enabled by the service owner.&amp;nbsp; here is an ESRI example how to&amp;nbsp; do it.&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/guide/checking-out-data-from-feature-layers-using-replicas/" title="https://developers.arcgis.com/python/guide/checking-out-data-from-feature-layers-using-replicas/"&gt;Sync overview | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 06:01:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848249#M3755</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2018-08-16T06:01:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you export a public service item from another organization?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848250#M3756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for that information simo.&amp;nbsp; I'll dig into the replica function a bit and see what I can come up with.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;#2 (download) sounds like it would work well for my needs.&amp;nbsp; But, I can't seem to get it to work for a feature service item. For example, how do you download the shapefile for this item:&amp;nbsp; &lt;A href="https://data-nctcoggis.opendata.arcgis.com/datasets/1990-census-block-groups" title="https://data-nctcoggis.opendata.arcgis.com/datasets/1990-census-block-groups"&gt;https://data-nctcoggis.opendata.arcgis.com/datasets/1990-census-block-groups&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can get properties like the item title and item type and I can download the metadata.&amp;nbsp; On the item page (&lt;A class="" href="https://data-nctcoggis.opendata.arcgis.com/datasets/1990-census-block-groups" title="https://data-nctcoggis.opendata.arcgis.com/datasets/1990-census-block-groups"&gt;https://data-nctcoggis.opendata.arcgis.com/datasets/1990-census-block-groups&lt;/A&gt;) I can select Download &amp;gt; Shapefile.&amp;nbsp; How do I download the shapfile for this item using the API?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;-Bruce&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Aug 2018 17:43:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848250#M3756</guid>
      <dc:creator>BruceGodfrey</dc:creator>
      <dc:date>2018-08-16T17:43:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do you export a public service item from another organization?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848251#M3757</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No worries Bruce.&lt;/P&gt;&lt;P&gt;Although the open data website provides download function on the interface but it does not provide an API for people who want to do it programmatically.&lt;/P&gt;&lt;P&gt;Why not&amp;nbsp;use the service as a direct datasource?&amp;nbsp; you can query it using "&lt;A class="link-titled" href="http://gis4.dfwmaps.com/arcgis/rest/services/rdc/rdc_Census/MapServer/14/query?outFields=*&amp;amp;where=1%3D1" title="http://gis4.dfwmaps.com/arcgis/rest/services/rdc/rdc_Census/MapServer/14/query?outFields=*&amp;amp;where=1%3D1"&gt;http://gis4.dfwmaps.com/arcgis/rest/services/rdc/rdc_Census/MapServer/14/query?outFields=*&amp;amp;where=1%3D1&lt;/A&gt;&amp;nbsp;" , and with the query it is completely possible to create a shapefile using ArcPy if you really need it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2018 00:19:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848251#M3757</guid>
      <dc:creator>simoxu</dc:creator>
      <dc:date>2018-08-17T00:19:43Z</dc:date>
    </item>
    <item>
      <title>Re: How do you export a public service item from another organization?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848252#M3758</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Okay, I'll go that route.&amp;nbsp; Hopefully the ArcGIS API for Python will include the functionality in the future.&amp;nbsp; Thanks, -Bruce&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2018 15:20:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-do-you-export-a-public-service-item-from/m-p/848252#M3758</guid>
      <dc:creator>BruceGodfrey</dc:creator>
      <dc:date>2018-08-17T15:20:11Z</dc:date>
    </item>
  </channel>
</rss>

