<?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: ArcGIS server 10.1 rest api queries fail inconsistently in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256316#M9895</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually my mistake, the first link (that doesn't work) should be&lt;/P&gt;&lt;P&gt;&lt;A href="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryType=esriGeometryEnvelope&amp;amp;returnGeometry=true&amp;amp;f=json" title="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryType=esriGeometryEnvelope&amp;amp;returnGeometry=true&amp;amp;f=json"&gt;http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryT…&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Mar 2015 12:12:06 GMT</pubDate>
    <dc:creator>karenpayne</dc:creator>
    <dc:date>2015-03-03T12:12:06Z</dc:date>
    <item>
      <title>ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256313#M9892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies for posting this both here and GIS.stackExchange (&lt;A href="http://gis.stackexchange.com/questions/137381/arcgis-server-10-1-rest-api-queries-fail-inconsistently" title="http://gis.stackexchange.com/questions/137381/arcgis-server-10-1-rest-api-queries-fail-inconsistently"&gt;ArcGIS server 10.1 rest api queries fail inconsistently - Geographic Information Systems Stack Exchange)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a set of Map and Esri Feature Services running on a 10.1 ArcGIS Server, with SQL Server in the back end.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I query the layers for either the geometry or OIDs using the rest interface, the query only works in certain instances.&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;LI&gt;If I query a point layer the result works as expected and I get the data&lt;/LI&gt;&lt;LI&gt;If I query a polygon layer like this, it fails: &lt;A href="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/6/query?geometryType=esriGeometryEnvelope&amp;amp;returnGeometry=true&amp;amp;f=json"&gt;http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?returnGeometry=true&amp;amp;f=json&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I get the error message&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;{"error":{"code":400,"message":"Unable&lt;BR /&gt;to complete operation.","details":["Unable to perform query&lt;BR /&gt;operation."]}}&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin: 0px 0px 0px 0.75in;"&gt;&lt;/P&gt;&lt;P&gt;The server log files show: Database error:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Courier New'; font-size: 10pt; mso-fareast-font-family: 'Times New Roman';"&gt;Operation without query criteria is not allowed.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However this query (same service, different polygon layer) works as expected and returns the feature geometry:&lt;/P&gt;&lt;P&gt;&lt;A href="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/6/query?geometryType=esriGeometryEnvelope&amp;amp;returnGeometry=true&amp;amp;f=json"&gt;http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/6/query?returnGeometry=true&amp;amp;f=json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;There are 2 polygon layers that I can query and get the expected result but all other polygon layers fail and for the life of me I cannot see any difference in the properties of the feature classes that fail vs those that do not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I dirty the query (by adding a where clause 1=1) I get the expected result; so for example, this query works:&lt;/P&gt;&lt;P&gt;&lt;A href="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?where=1%3D1&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;returnGeometry=true&amp;amp;returnCountOnly=false&amp;amp;f=json"&gt;http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?where=1%3D1&amp;amp;returnGeometry=true&amp;amp;f=json&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I’ve looked at:&lt;/P&gt;&lt;OL style="list-style-type: decimal;"&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;I have not hit the max feature limit set on the server or the service&lt;/LI&gt;&lt;LI&gt;the behavior is consistent across browsers&lt;/LI&gt;&lt;LI&gt;the behavior is consistent using either get or post&lt;/LI&gt;&lt;LI&gt;I have rebuilt the spatial indices&lt;/LI&gt;&lt;LI&gt;The behavior is consistent if I ask for json or html response&lt;/LI&gt;&lt;/OL&gt;&lt;/OL&gt;&lt;P&gt;I’d be grateful for any pointers or areas that I should look at.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Asrujit SenGupta&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Mar 2015 22:11:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256313#M9892</guid>
      <dc:creator>karenpayne</dc:creator>
      <dc:date>2015-03-02T22:11:06Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256314#M9893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Strange, all 3 URL's posted return a valid result for me...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 01:06:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256314#M9893</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-03-03T01:06:58Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256315#M9894</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Now that's interesting thanks Xander! I'll work on our outside tester this morning. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 12:09:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256315#M9894</guid>
      <dc:creator>karenpayne</dc:creator>
      <dc:date>2015-03-03T12:09:59Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256316#M9895</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Actually my mistake, the first link (that doesn't work) should be&lt;/P&gt;&lt;P&gt;&lt;A href="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryType=esriGeometryEnvelope&amp;amp;returnGeometry=true&amp;amp;f=json" title="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryType=esriGeometryEnvelope&amp;amp;returnGeometry=true&amp;amp;f=json"&gt;http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryT…&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 12:12:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256316#M9895</guid>
      <dc:creator>karenpayne</dc:creator>
      <dc:date>2015-03-03T12:12:06Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256317#M9896</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That URL indeed does not work (although I'm using a different network than yesterday).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I though this might be due to specifying the geometryType parameter without specifying a geometry, but when I remove it, it still does not work. When adding the 1=1 as whereclause it does work... (as you said).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 12:29:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256317#M9896</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-03-03T12:29:22Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256318#M9897</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I see that you are using ArcGIS for Server 10.1 SP1. If I use the query on a service here using the exact same parameters it throws me this error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{"error":{"code":400,"message":"Invalid or missing input parameters.","details":[]}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Different from yours, but still an error. I think you can best include the where clause 1=1 or using a random number (random number = random number) to avoid it. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In case you don't want to specify a where clause you can still use the geometry with an envelope that covers the area:&lt;/P&gt;&lt;P&gt;&lt;A href="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryType=esriGeometryEnvelope&amp;amp;geometry=-180,-90,180,90&amp;amp;returnGeometry=true&amp;amp;f=json" title="http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryType=esriGeometryEnvelope&amp;amp;geometry=-180,-90,180,90&amp;amp;returnGeometry=true&amp;amp;f=json"&gt;http://gistmapsdev.itos.uga.edu/arcgis/rest/services/COD_External/SYR_AR_DynamicLabeling/FeatureServer/5/query?geometryT…&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 12:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256318#M9897</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2015-03-03T12:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256319#M9898</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for looking at this Xander. Interesting workaround with the envelope; that's good to know.&amp;nbsp; thanks again,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Mar 2015 13:19:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256319#M9898</guid>
      <dc:creator>karenpayne</dc:creator>
      <dc:date>2015-03-03T13:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS server 10.1 rest api queries fail inconsistently</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256320#M9899</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;my error&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{"error":{"code":400,"message":"Invalid or missing input parameters.","details":[]}}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;however&amp;nbsp;1=1&amp;nbsp;worked for me. thx&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;not sure if related to the error i was getting but found one of the geometry features had no coords&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;{&lt;BR /&gt; "attributes": {&lt;BR /&gt; "Name": "sample"&lt;BR /&gt; },&lt;BR /&gt; "geometry": {&lt;BR /&gt; "rings": [&lt;BR /&gt; &lt;BR /&gt; ]&lt;BR /&gt; }&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Oct 2017 00:56:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/arcgis-server-10-1-rest-api-queries-fail/m-p/256320#M9899</guid>
      <dc:creator>BrianMcAuslan</dc:creator>
      <dc:date>2017-10-31T00:56:53Z</dc:date>
    </item>
  </channel>
</rss>

