<?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: Get all data using REST GET request in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065813#M3877</link>
    <description>&lt;P&gt;If you are wanting/needing the "raw" data to do analysis locally, I strongly discourage obtaining the data set from a GIS service.&amp;nbsp; GIS services are handy for quite a few things, but they make terrible data exchanges for dense data sets, at least in my opinion.&amp;nbsp; Additionally and specifically for this data set, it is being served up in Web Mercator, which is a garbage projection unless you making/using basic browser-based maps.&lt;/P&gt;&lt;P&gt;If you visit &lt;A href="https://data.doi.gov/dataset/blm-national-surface-management-agency-area-polygons-national-geospatial-data-asset-ngda" target="_blank"&gt;BLM National Surface Management Agency Area Polygons - National Geospatial Data Asset (NGDA) - data.doi.gov&lt;/A&gt;, you can download the data, which looks to be an 850 MB zip file.&amp;nbsp; Good luck downloading an 850 MB data set via map service, that will be fun and slow.&lt;/P&gt;</description>
    <pubDate>Mon, 07 Jun 2021 23:48:32 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2021-06-07T23:48:32Z</dc:date>
    <item>
      <title>Get all data using REST GET request</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065781#M3872</link>
      <description>&lt;P&gt;First time user.&amp;nbsp; Please forgive my ignorance.&amp;nbsp; I have read the instructions and did some searches on this discussion board.&amp;nbsp; Still have some beginner questions...&lt;/P&gt;&lt;P&gt;I'm trying to get a GeoJSON output of all BLM land in the US.&amp;nbsp; I am on this query page:&lt;/P&gt;&lt;P&gt;&lt;A href="https://gis.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_Cached_BLM_Only/MapServer/2/query" target="_blank" rel="noopener"&gt;https://gis.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_Cached_BLM_Only/MapServer/2/query&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm guessing this the correct page of instructions on how to query the data.&amp;nbsp; Can you confirm?&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-map-service-layer-.htm" target="_blank" rel="noopener"&gt;https://developers.arcgis.com/rest/services-reference/enterprise/query-map-service-layer-.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;On the query form I am leaving all the defaults except for the following:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Format&lt;/STRONG&gt; changed to GeoJSON&lt;BR /&gt;&lt;BR /&gt;I pressed the GET button and see this response:&lt;/P&gt;&lt;PRE&gt;{"error":{"code":400,"message":"","details":[]}}&lt;/PRE&gt;&lt;P&gt;Here is the GET request:&lt;BR /&gt;&lt;A href="https://gis.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_Cached_BLM_Only/MapServer/2/query?where=&amp;amp;text=&amp;amp;objectIds=&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;distance=&amp;amp;units=esriSRUnit_Foot&amp;amp;relationParam=&amp;amp;outFields=&amp;amp;returnGeometry=true&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;havingClause=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;returnExtentOnly=false&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=geojson" target="_blank" rel="noopener"&gt;https://gis.blm.gov/arcgis/rest/services/lands/BLM_Natl_SMA_Cached_BLM_Only/MapServer/2/query?where=&amp;amp;text=&amp;amp;objectIds=&amp;amp;time=&amp;amp;geometry=&amp;amp;geometryType=esriGeometryEnvelope&amp;amp;inSR=&amp;amp;spatialRel=esriSpatialRelIntersects&amp;amp;distance=&amp;amp;units=esriSRUnit_Foot&amp;amp;relationParam=&amp;amp;outFields=&amp;amp;returnGeometry=true&amp;amp;returnTrueCurves=false&amp;amp;maxAllowableOffset=&amp;amp;geometryPrecision=&amp;amp;outSR=&amp;amp;havingClause=&amp;amp;returnIdsOnly=false&amp;amp;returnCountOnly=false&amp;amp;orderByFields=&amp;amp;groupByFieldsForStatistics=&amp;amp;outStatistics=&amp;amp;returnZ=false&amp;amp;returnM=false&amp;amp;gdbVersion=&amp;amp;historicMoment=&amp;amp;returnDistinctValues=false&amp;amp;resultOffset=&amp;amp;resultRecordCount=&amp;amp;returnExtentOnly=false&amp;amp;datumTransformation=&amp;amp;parameterValues=&amp;amp;rangeValues=&amp;amp;quantizationParameters=&amp;amp;featureEncoding=esriDefault&amp;amp;f=geojson&lt;/A&gt;&lt;/P&gt;&lt;P&gt;I'm assuming there are some required fields not filled out.&amp;nbsp; I then tried to add the following&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Outfields&lt;/STRONG&gt; = *&lt;BR /&gt;&lt;STRONG&gt;Where&lt;/STRONG&gt; = 1=1&lt;/P&gt;&lt;P&gt;The GET request spins for about 10 min then returns an error:&lt;BR /&gt;&lt;STRONG&gt;ArcGIS Web Adaptor. Could not access any server machines. Please contact your system administrator.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am trying different parameters to get it to work and I have a hunch that I need to provide an &lt;/SPAN&gt;&lt;STRONG&gt;Input Geometry&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; I'm confused exactly what this field does.&amp;nbsp; If I want all the data, do I just specify an envelope rectangle around the entire globe i.e.&amp;nbsp; x and y values of -180 to 180 and -90 to 90 and say &lt;/SPAN&gt;&lt;STRONG&gt;within&lt;/STRONG&gt;&lt;SPAN&gt;?&amp;nbsp; I do see some examples in the docs but don't understand why I need to specify an input geometry.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for helping me understand this.&amp;nbsp; Go easy on me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; Peace!&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 22:18:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065781#M3872</guid>
      <dc:creator>PerfectCamp</dc:creator>
      <dc:date>2021-06-07T22:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Get all data using REST GET request</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065787#M3873</link>
      <description>&lt;P&gt;Input geometry filters the result by some extent or custom spatial relationship, like intersecting with some point.&lt;/P&gt;&lt;P&gt;I'm able to get results from this when setting the &lt;STRONG&gt;returnGeometry&lt;/STRONG&gt; parameter to &lt;STRONG&gt;False&lt;/STRONG&gt;, if thta's helpful.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 22:17:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065787#M3873</guid>
      <dc:creator>jcarlson</dc:creator>
      <dc:date>2021-06-07T22:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Get all data using REST GET request</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065791#M3874</link>
      <description>&lt;P&gt;Have a look when the query is OBJECTID=1, the geometry for all of those features is probably just too much for the request.&amp;nbsp; Possibly iterate through all the objectIDs as separate requests and collate?&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 22:38:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065791#M3874</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2021-06-07T22:38:49Z</dc:date>
    </item>
    <item>
      <title>Re: Get all data using REST GET request</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065792#M3875</link>
      <description>&lt;P&gt;these are large geometries, so I'm guessing the server is choking trying to return everything all at once.&lt;/P&gt;&lt;P&gt;You can limit your return with a where clause, or an input geometry filter.&lt;/P&gt;&lt;P&gt;Or if you really want everything, try using a combination of ResultRecordCount and ResultOffset to get the data a little bit at a time.&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer-.htm" target="_blank"&gt;https://developers.arcgis.com/rest/services-reference/enterprise/query-feature-service-layer-.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 22:41:05 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065792#M3875</guid>
      <dc:creator>BenRomlein</dc:creator>
      <dc:date>2021-06-07T22:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: Get all data using REST GET request</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065795#M3876</link>
      <description>&lt;P&gt;Thanks so much to those who responded so fast!! You guys are great!&amp;nbsp; Yes I was able to get a list of all the OBJECTID's then I'm writing a script to grab just one at a time.&amp;nbsp; I did not have to use Input Geometry, just had to limit the response to something manageable by specifying WHERE OBJECTID = 1 and it seems to work without choking!&amp;nbsp; Awesome!&amp;nbsp; I'll get on it.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 22:59:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065795#M3876</guid>
      <dc:creator>PerfectCamp</dc:creator>
      <dc:date>2021-06-07T22:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: Get all data using REST GET request</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065813#M3877</link>
      <description>&lt;P&gt;If you are wanting/needing the "raw" data to do analysis locally, I strongly discourage obtaining the data set from a GIS service.&amp;nbsp; GIS services are handy for quite a few things, but they make terrible data exchanges for dense data sets, at least in my opinion.&amp;nbsp; Additionally and specifically for this data set, it is being served up in Web Mercator, which is a garbage projection unless you making/using basic browser-based maps.&lt;/P&gt;&lt;P&gt;If you visit &lt;A href="https://data.doi.gov/dataset/blm-national-surface-management-agency-area-polygons-national-geospatial-data-asset-ngda" target="_blank"&gt;BLM National Surface Management Agency Area Polygons - National Geospatial Data Asset (NGDA) - data.doi.gov&lt;/A&gt;, you can download the data, which looks to be an 850 MB zip file.&amp;nbsp; Good luck downloading an 850 MB data set via map service, that will be fun and slow.&lt;/P&gt;</description>
      <pubDate>Mon, 07 Jun 2021 23:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/get-all-data-using-rest-get-request/m-p/1065813#M3877</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-06-07T23:48:32Z</dc:date>
    </item>
  </channel>
</rss>

