<?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: Basic REST API Query Question in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204866#M1010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In C# I would write it like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Return all features&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Where = "1=1";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I was hitting the rest endpoint directly...lets use this rest for an example &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5/query" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5/query&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the where box I would enter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select JSON - Hit the Query(get) button and you will get all records returned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2012 14:36:01 GMT</pubDate>
    <dc:creator>JMcNeil</dc:creator>
    <dc:date>2012-04-24T14:36:01Z</dc:date>
    <item>
      <title>Basic REST API Query Question</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204864#M1008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm pretty new to the REST API (having played around with the JavaScript API a good bit though) - &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm curious what are the constraints on varies queries...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For instance, if I want the json returned for an entire map service layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;http://win-2rninrlf7l8/ArcGIS/rest/services/FSDO_NoSDE/MapServer/0/query?f=json&lt;/PRE&gt;&lt;SPAN&gt; doesn't seem to work.&amp;nbsp; I have to include a WHERE parameter to narrow the search.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;When I try to return _everything_ I get an error that says...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;"where' parameter not specified","'objectIds' parameter not specified","'time' parameter not specified","'geometry' parameter not specified","'text' parameter not specified"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Are the above parameters necessary to narrow the number of results that could potentially be returned?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there any way to just return _all_ of the features + geometry in a map service layer?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for your help!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:02:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204864#M1008</guid>
      <dc:creator>JayGregory</dc:creator>
      <dc:date>2012-04-24T14:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: Basic REST API Query Question</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204865#M1009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;How are you returning everything with WHERE.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For example in a state layer if I use this in WHERE it works for me:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;STATE_NAME LIKE '%'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's full url using ESRI sample server, the WHERE will be HTML encoded:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5/query?text=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryPoint&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;relationParam=&amp;amp;objectIds=&amp;amp;where=STATE_NAME+LIKE+%27%25%27&amp;amp;time=&amp;amp;returnCountOnly=false&amp;amp;returnIdsOnly=false&amp;amp;returnGeometry=true&amp;amp;maxAllowableOffset=&amp;amp;outSR=&amp;amp;outFields=&amp;amp;f=pjson&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Maybe a better way but this seems to work&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:34:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204865#M1009</guid>
      <dc:creator>RobWaller</dc:creator>
      <dc:date>2012-04-24T14:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: Basic REST API Query Question</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204866#M1010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;In C# I would write it like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;// Return all features&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;query.Where = "1=1";&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If I was hitting the rest endpoint directly...lets use this rest for an example &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5/query" rel="nofollow" target="_blank"&gt;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/5/query&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;in the where box I would enter&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Select JSON - Hit the Query(get) button and you will get all records returned.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 14:36:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204866#M1010</guid>
      <dc:creator>JMcNeil</dc:creator>
      <dc:date>2012-04-24T14:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: Basic REST API Query Question</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204867#M1011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks all - that worked.&amp;nbsp; I just wasn't sure what parameters were required for the query to work.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2012 15:26:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/basic-rest-api-query-question/m-p/204867#M1011</guid>
      <dc:creator>JayGregory</dc:creator>
      <dc:date>2012-04-24T15:26:05Z</dc:date>
    </item>
  </channel>
</rss>

