<?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: SampleServer6 - Feature Server Query returns empty list in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219289#M4287</link>
    <description>&lt;P&gt;Good morning! It appears you're trying to query the feature service instead of a specific feature layer within the service. To query a layer within the service, add the layer ID to the URL after /FeatureServer. So I think the URL you are actually looking for is this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/query?where=1=1&amp;amp;returnidsonly=true" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer&lt;STRONG&gt;/0/&lt;/STRONG&gt;query?where=1=1&amp;amp;returnidsonly=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can get a list of all available layers in the service by going to the endpoint below and looking under "Layers".&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 06 Oct 2022 13:17:37 GMT</pubDate>
    <dc:creator>GeoJosh</dc:creator>
    <dc:date>2022-10-06T13:17:37Z</dc:date>
    <item>
      <title>SampleServer6 - Feature Server Query returns empty list</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219263#M4286</link>
      <description>&lt;P&gt;Dear community,&amp;nbsp;&lt;/P&gt;&lt;P&gt;For a school project I need to make use of the Arcgis REST API. I was reading the documentation at &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-.htm#:~:text=The%20syntax%20example%20below%20demonstrates%20the%20structure%20of%20the%20response%20returned%20by%20query%20when%20returnIdsOnly%20is%20true." target="_self"&gt;this page&lt;/A&gt;&amp;nbsp;and decided to try it out with sample server 6. Unfortunately i got this response:&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;"layers"&lt;/SPAN&gt;&lt;SPAN&gt;:&amp;nbsp;[]&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;This is the the link I used to get the above response:&amp;nbsp;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/query?returnIdsOnly=true&amp;amp;f=json" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/query?returnIdsOnly=true&amp;amp;f=json&lt;/A&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Am I doing something wrong or is this just sampleserver 6? If it is sampleserver 6 should I just create my own server/features or are there any other public servers I can use to experiment with the API?&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 06 Oct 2022 11:25:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219263#M4286</guid>
      <dc:creator>Ahmed_S</dc:creator>
      <dc:date>2022-10-06T11:25:07Z</dc:date>
    </item>
    <item>
      <title>Re: SampleServer6 - Feature Server Query returns empty list</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219289#M4287</link>
      <description>&lt;P&gt;Good morning! It appears you're trying to query the feature service instead of a specific feature layer within the service. To query a layer within the service, add the layer ID to the URL after /FeatureServer. So I think the URL you are actually looking for is this:&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0/query?where=1=1&amp;amp;returnidsonly=true" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer&lt;STRONG&gt;/0/&lt;/STRONG&gt;query?where=1=1&amp;amp;returnidsonly=true&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You can get a list of all available layers in the service by going to the endpoint below and looking under "Layers".&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer" target="_blank"&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 13:17:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219289#M4287</guid>
      <dc:creator>GeoJosh</dc:creator>
      <dc:date>2022-10-06T13:17:37Z</dc:date>
    </item>
    <item>
      <title>Re: SampleServer6 - Feature Server Query returns empty list</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219305#M4288</link>
      <description>&lt;P&gt;Hi, Thank you for your response!&lt;/P&gt;&lt;P&gt;Your link definitely works, but I was actually looking to get &lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-.htm#:~:text=%7B%0A%20%20%22layers%22%3A%5B%0A%20%20%20%20%7B%0A%20%20%20%20%20%20%22id%22%3A%20%3ClayerId1,objectId1%3E%2C%0A%20%20%20%20%20%20%20%20%3CobjectId2%3E%2C%0A%20%20%20%20%20%20%20%20%3CobjectId3%3E%0A%20%20%20%20%20%20%5D%0A%20%20%20%20%7D%0A%20%20%5D%0A%7D" target="_self"&gt;this response&amp;nbsp;&lt;/A&gt;as shown in the documentation. The way it was shown in the documentation is that you can make a query directly on the service to get this response and not necessarily on the layer itself.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 13:55:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219305#M4288</guid>
      <dc:creator>Ahmed_S</dc:creator>
      <dc:date>2022-10-06T13:55:33Z</dc:date>
    </item>
    <item>
      <title>Re: SampleServer6 - Feature Server Query returns empty list</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219315#M4289</link>
      <description>&lt;P&gt;Ah you're right! My bad.&lt;/P&gt;&lt;P&gt;It looks like you need to specify query string for the "layerDefs" to get a response back. This worked for me:&lt;/P&gt;&lt;P&gt;&lt;A href="https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/query?layerDefs=0:1=1;1:1=1&amp;amp;f=json&amp;amp;returnidsonly=true" target="_self"&gt;&lt;SPAN&gt;https://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/query?&lt;STRONG&gt;layerDefs=0:1=1;1:1=1&lt;/STRONG&gt;&amp;amp;f=json&amp;amp;returnidsonly=true&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;The format is &amp;lt;layerID1&amp;gt;:&amp;lt;whereClause1&amp;gt;;&amp;lt;layerID2&amp;gt;:&amp;lt;whereClause2&amp;gt; and so on.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 Oct 2022 17:48:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/sampleserver6-feature-server-query-returns-empty/m-p/1219315#M4289</guid>
      <dc:creator>GeoJosh</dc:creator>
      <dc:date>2022-10-06T17:48:52Z</dc:date>
    </item>
  </channel>
</rss>

