<?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 to send a synchronous query request to a Map Service using python? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-send-a-synchronous-query-request-to-a-map/m-p/745845#M57671</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quinnnnnnnn!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response - I actually just tried again this morning and it seems to be working just fine. Not totally sure what was going on yesterday, could have been an issue with my own network.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Nov 2017 18:45:43 GMT</pubDate>
    <dc:creator>KaraManseau</dc:creator>
    <dc:date>2017-11-29T18:45:43Z</dc:date>
    <item>
      <title>How to send a synchronous query request to a Map Service using python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-send-a-synchronous-query-request-to-a-map/m-p/745843#M57669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to write the returned JSON from the Map Service query request to file, but if the server is too slow or there is too much data, it appears to be returning results incrementally causing the script to fail. I am wondering if there is way to force the results to fully load before the script continues on, but am having troubles finding a solution. Here is my script thus far:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;params = {&lt;BR /&gt; 'where': '1=1',&lt;BR /&gt; 'geometryType': 'esriGeometryEnvelope',&lt;BR /&gt; 'spatialRel': 'esriSpatialRelIntersects',&lt;BR /&gt; 'outFields': '*',&lt;BR /&gt; 'returnGeometry': 'true',&lt;BR /&gt; 'returnTrueCurves': 'false',&lt;BR /&gt; 'returnIdsOnly': 'false',&lt;BR /&gt; 'returnCountOnly': 'false',&lt;BR /&gt; 'returnZ': 'false',&lt;BR /&gt; 'returnM': 'false',&lt;BR /&gt; 'returnDistinctValues': 'false',&lt;BR /&gt; 'f': 'pjson'&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;url = server + "/" + str(i) + "/query"&lt;BR /&gt; r = requests.post(url, params)&lt;BR /&gt; result = json.load(urllib.urlopen(url))&lt;/P&gt;&lt;P&gt;jsonFile = open(name, 'w')&lt;BR /&gt; json.dump(result, jsonFile)&lt;BR /&gt; jsonFile.close()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 17:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-send-a-synchronous-query-request-to-a-map/m-p/745843#M57669</guid>
      <dc:creator>KaraManseau</dc:creator>
      <dc:date>2017-11-29T17:38:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a synchronous query request to a Map Service using python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-send-a-synchronous-query-request-to-a-map/m-p/745844#M57670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sup Kara &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/grin.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The response from the query should only be returned when it's done.&amp;nbsp; There's a default set of 1000 or 2000 records returned on a query, so you may not get all records if there are more than 1000 features in the layer.&amp;nbsp; Is the service you're querying against public?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 18:01:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-send-a-synchronous-query-request-to-a-map/m-p/745844#M57670</guid>
      <dc:creator>JonathanQuinn</dc:creator>
      <dc:date>2017-11-29T18:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to send a synchronous query request to a Map Service using python?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-send-a-synchronous-query-request-to-a-map/m-p/745845#M57671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quinnnnnnnn!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the response - I actually just tried again this morning and it seems to be working just fine. Not totally sure what was going on yesterday, could have been an issue with my own network.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Nov 2017 18:45:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-send-a-synchronous-query-request-to-a-map/m-p/745845#M57671</guid>
      <dc:creator>KaraManseau</dc:creator>
      <dc:date>2017-11-29T18:45:43Z</dc:date>
    </item>
  </channel>
</rss>

