Using item.export arcgis.gis module — arcgis 1.4.2 documentation 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):
<SPAN class="keyword token">from</SPAN> arcgis<SPAN class="punctuation token">.</SPAN>gis <SPAN class="keyword token">import</SPAN> <SPAN class="operator token">*</SPAN>
gis <SPAN class="operator token">=</SPAN> GIS<SPAN class="punctuation token">(</SPAN>username<SPAN class="operator token">=</SPAN><SPAN class="string token">"user_name"</SPAN><SPAN class="punctuation token">,</SPAN> password<SPAN class="operator token">=</SPAN><SPAN class="string token">"password"</SPAN><SPAN class="punctuation token">)</SPAN>
data_item_id <SPAN class="operator token">=</SPAN> <SPAN class="string token">"abcde12345"</SPAN>
data_item <SPAN class="operator token">=</SPAN> gis<SPAN class="punctuation token">.</SPAN>content<SPAN class="punctuation token">.</SPAN>get<SPAN class="punctuation token">(</SPAN>data_item_id<SPAN class="punctuation token">)</SPAN>
output_file <SPAN class="operator token">=</SPAN> data_item<SPAN class="punctuation token">.</SPAN>export<SPAN class="punctuation token">(</SPAN>title<SPAN class="operator token">=</SPAN>data_item_id<SPAN class="punctuation token">,</SPAN>export_format<SPAN class="operator token">=</SPAN><SPAN class="string token">"Shapefile"</SPAN><SPAN class="punctuation token">,</SPAN>wait<SPAN class="operator token">=</SPAN><SPAN class="token boolean">True</SPAN><SPAN class="punctuation token">)</SPAN>
output_file<SPAN class="punctuation token">.</SPAN>download<SPAN class="punctuation token">(</SPAN>save_path <SPAN class="operator token">=</SPAN> <SPAN class="string token">"D:\\temp\\data\\"</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
The documentation states: "Available only to users with an organizational subscription. Invokable only by the service item owner or an administrator."
How do I export data from a public feature service item available from an organization of which I am not a member? 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? I have a number of items I would like to download.
Thank you for any help. I'm stuck.
-Bruce