<?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: Why can't I save a JSON locally with the arcgis python api in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-can-t-i-save-a-json-locally-with-the-arcgis/m-p/851007#M3829</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are seeing is expected behavior.&amp;nbsp; In the documentation you reference, there is a link to&amp;nbsp;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000rp000000"&gt;Create Replica&lt;/A&gt; for the ArcGIS REST API.&amp;nbsp; Since the ArcGIS API for Python is really driven by the ArcGIS REST API, it is important to understand the REST API equivalent of Python API functions.&amp;nbsp; In this case, the ArcGIS REST API only supports &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;json&lt;/SPAN&gt; and &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;sqlite&lt;/SPAN&gt; data formats while the Python API supports more, so the Python API is doing something with the results from &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;json&lt;/SPAN&gt; to create file geodatabase or shape files.&amp;nbsp; You are getting the URL of the JSON results returned to you, you just need to download it to a file if you want to store it in a file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 02 Jun 2017 15:16:47 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2017-06-02T15:16:47Z</dc:date>
    <item>
      <title>Why can't I save a JSON locally with the arcgis python api</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-can-t-i-save-a-json-locally-with-the-arcgis/m-p/851006#M3828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Really strange behaviour. When I create a replica of a file and set as data-format 'filegdb':&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;replica1 = flc.replicas.create(replica_name = "test", layers='0', data_format='filegdb', out_path='/Users/username/Desktop')&lt;BR /&gt; print(replica1)&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;I get:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;/Users/...&lt;SPAN style="color: #3d3d3d; background-color: #f6f6f6;"&gt;username...&lt;/SPAN&gt;/Desktop/b60ff113bc944907bd37ce33ced3f22b.zip&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;and file appears on Desktop. &lt;BR /&gt;However, when I change data_format to 'json' or when I delete the line (since JSON is default) the result is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE style="color: #000000; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;{'transportType': 'esriTransportTypeUrl', 'URL': 'http://services7.arcgis.com/...code.../ArcGIS/rest/services/...name.../FeatureServer/replicafiles/a21d42fdfbd440e698d4646f48442e4a.json'}&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;And no file appears on Desktop. What can go wrong here? I use the default and follow:&amp;nbsp;&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;Checking out data from feature layers using replicas | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Extract and Sync are on, I check that beforehand.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 09:03:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/why-can-t-i-save-a-json-locally-with-the-arcgis/m-p/851006#M3828</guid>
      <dc:creator>ANSAdviesgroep</dc:creator>
      <dc:date>2017-06-02T09:03:05Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I save a JSON locally with the arcgis python api</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-can-t-i-save-a-json-locally-with-the-arcgis/m-p/851007#M3829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What you are seeing is expected behavior.&amp;nbsp; In the documentation you reference, there is a link to&amp;nbsp;&lt;A href="http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r3000000rp000000"&gt;Create Replica&lt;/A&gt; for the ArcGIS REST API.&amp;nbsp; Since the ArcGIS API for Python is really driven by the ArcGIS REST API, it is important to understand the REST API equivalent of Python API functions.&amp;nbsp; In this case, the ArcGIS REST API only supports &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;json&lt;/SPAN&gt; and &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;sqlite&lt;/SPAN&gt; data formats while the Python API supports more, so the Python API is doing something with the results from &lt;SPAN style="font-family: courier new,courier,monospace;"&gt;json&lt;/SPAN&gt; to create file geodatabase or shape files.&amp;nbsp; You are getting the URL of the JSON results returned to you, you just need to download it to a file if you want to store it in a file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 15:16:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/why-can-t-i-save-a-json-locally-with-the-arcgis/m-p/851007#M3829</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2017-06-02T15:16:47Z</dc:date>
    </item>
    <item>
      <title>Re: Why can't I save a JSON locally with the arcgis python api</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/why-can-t-i-save-a-json-locally-with-the-arcgis/m-p/851008#M3830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You do know that the sqlite is exporting to the out_path.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So REST API: json | sqlite&lt;/P&gt;&lt;P&gt;Python API: json | sqlite | filegdb | shapefile&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And in the python API the possibility to select an out_path.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Result:&amp;nbsp;Only json doesn't export to the mentioned out_path while the other's do.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, don't you agree that it seems is off? Or are you able to get the json on out_path location?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Jun 2017 18:57:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/why-can-t-i-save-a-json-locally-with-the-arcgis/m-p/851008#M3830</guid>
      <dc:creator>ANSAdviesgroep</dc:creator>
      <dc:date>2017-06-02T18:57:52Z</dc:date>
    </item>
  </channel>
</rss>

