<?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 do you store a feature service locally for edits? in ArcGIS REST APIs and Services Questions</title>
    <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602021#M2866</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your purpose is to have a local copy of the data to develop against (not updating the service itself) you could use some python code to extract the data of the map service:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
fcout = r'C:\Forum\Hydrants\test01.shp'
&lt;SPAN&gt;url = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0/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=1%3D1&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" rel="nofollow noopener noreferrer" target="_blank"&gt;http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0/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=1%3D1&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;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;
fs = arcpy.FeatureSet()
fs.load(url)
arcpy.CopyFeatures_management(fs, fcout)&lt;/PRE&gt;&lt;P&gt;Since the number of features is more than 1000 and the maps service is configured to return a max of 1000 feature per request, the code should be adapted to use the object id to query with OBJECTID &amp;gt; highest id from previous request. Create the featureclass in the first step and append for the subsequent queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note this will only provide you a local copy of the data. The Map Service has no methods to update the service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 01:49:09 GMT</pubDate>
    <dc:creator>XanderBakker</dc:creator>
    <dc:date>2021-12-12T01:49:09Z</dc:date>
    <item>
      <title>How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602019#M2864</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I am creating an app for a local fire department. I have acquired fire hydrant location data from:&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;A class="jive-link-external-small" href="http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0" rel="nofollow" target="_blank"&gt;http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0&lt;/A&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;I have imported it as a feature service in ArcGIS Desktop, however I cannot edit the data. I am trying to make a copy (maybe as a shp file) and start with that data to edit it.&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Is this possible? Or is there a workaround since I cannot access it (I have asked multiple times but they have not granted as yet)?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 20:15:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602019#M2864</guid>
      <dc:creator>stefanlivingston2</dc:creator>
      <dc:date>2014-12-17T20:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602020#M2865</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Stefan, the map service you are referencing does not appear to be editable. You will need to ask the server admin to enable the editing capabilities and assuming the data is stored in an enterprise RDMS and not in a file geodatabase this&amp;nbsp; will spin up a feature service with the URL &lt;A class="jive-link-external-small" href="http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0" rel="nofollow" style="font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; color: #287433;" target="_blank"&gt;http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/FeatureServer/0 .&lt;/A&gt;‌ But your server admins will likely want to secure the service with a username &amp;amp; password &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 02:18:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602020#M2865</guid>
      <dc:creator>TobiasFimpel1</dc:creator>
      <dc:date>2014-12-18T02:18:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602021#M2866</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If your purpose is to have a local copy of the data to develop against (not updating the service itself) you could use some python code to extract the data of the map service:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
fcout = r'C:\Forum\Hydrants\test01.shp'
&lt;SPAN&gt;url = '&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0/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=1%3D1&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" rel="nofollow noopener noreferrer" target="_blank"&gt;http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0/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=1%3D1&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;/A&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;
fs = arcpy.FeatureSet()
fs.load(url)
arcpy.CopyFeatures_management(fs, fcout)&lt;/PRE&gt;&lt;P&gt;Since the number of features is more than 1000 and the maps service is configured to return a max of 1000 feature per request, the code should be adapted to use the object id to query with OBJECTID &amp;gt; highest id from previous request. Create the featureclass in the first step and append for the subsequent queries.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note this will only provide you a local copy of the data. The Map Service has no methods to update the service.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:49:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602021#M2866</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T01:49:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602022#M2867</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What would the subsequent code look like? Can you run and provide the SHP file? I am fairly new to the python world. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Dec 2014 16:49:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602022#M2867</guid>
      <dc:creator>stefanlivingston2</dc:creator>
      <dc:date>2014-12-18T16:49:37Z</dc:date>
    </item>
    <item>
      <title>Re: How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602023#M2868</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In theory you could use something like the code below, but it is throwing me an error (might be due to the proxy):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN lang="EN-US"&gt;def main():&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import arceditor&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import arcpy&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; import urllib, urllib2, json&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; target = r'D:\Xander\GeoNet\Hydrants\test02.shp'&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; service_url = r"&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0" rel="nofollow noopener noreferrer" target="_blank"&gt;http://gisweb.wsscwater.com/ArcGIS/rest/services/FireHydrant/FireBook/MapServer/0&lt;/A&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if arcpy.Exists(target):&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Delete_management(target)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; bln_copy = True&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; exceededTransferLimit = True&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; i = 0&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; while exceededTransferLimit:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i += 1&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if i == 1:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nextoid = 0&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; url = '{0}/query?where=OBJECTID&amp;gt;%3D{1}&amp;amp;outFields=*&amp;amp;returnGeometry=true&amp;amp;f=json'.format(service_url, nextoid)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print url&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; params = urllib.urlencode({'f': 'json', 'where': "OBJECTID&amp;gt;={0} AND TIPO_DIRECCION = 'R'".format(nextoid), 'outFields': 'OBJECTID', 'returnGeometry': 'false'})&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; req = urllib2.Request("{0}/query".format(service_url), params)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; response = urllib2.urlopen(req)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; jsonResult = json.load(response)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; nextoid = getMaxOID(jsonResult) + 1&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if "exceededTransferLimit" in jsonResult:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; exceededTransferLimit = jsonResult["exceededTransferLimit"]&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fs = arcpy.FeatureSet()&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fs.load(url)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cnt = arcpy.GetCount_management(fs).getOutput(0)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Count: " + cnt&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if cnt != 0:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if bln_copy:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print " - copy"&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(fs, target)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; bln_copy = False&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print " - append"&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(fs, target)&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; except Exception as e:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print e&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if exceededTransferLimit == False:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; break&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;def getMaxOID(jsn):&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; max_oid = 0&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if "features" in jsn:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ftrs = jsn["features"]&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for ft in ftrs:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if "attributes" in ft:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; att = ft["attributes"]&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if "OBJECTID" in att:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oid = att["OBJECTID"]&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if oid &amp;gt; max_oid:&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; max_oid = oid&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; return max_oid&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;if __name__ == '__main__':&lt;/SPAN&gt;
&lt;SPAN lang="EN-US"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;main()&lt;/PRE&gt;&lt;P&gt;... so I did it in a little more manual way and attached the shapefile to this post. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 01:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602023#M2868</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2021-12-12T01:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602024#M2869</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So very helpful but the unforunately didnt inlcude all the data elements in the original feature server. Any idea on how to solve?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Dec 2014 04:25:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602024#M2869</guid>
      <dc:creator>stefanlivingston2</dc:creator>
      <dc:date>2014-12-20T04:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602025#M2870</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Stefan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After we had contact through mail I send you a complete shapefile of the 46+K features. For those of you that may have a similar question I'll include an explanation of the steps that I followed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I did was:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;Through REST a query for all the ID's of the hydrants&lt;/LI&gt;&lt;LI&gt;Access the list of ObjectIDs&lt;/LI&gt;&lt;LI&gt;Sort this list of ObjectIDs&lt;/LI&gt;&lt;LI&gt;Create chunks with less than 1000 elements&lt;/LI&gt;&lt;LI&gt;For each chunk (list of sorted ID's), determine the min and max&lt;/LI&gt;&lt;LI&gt;Query the service for ID's in the range of each min and max.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now at home, where I don't have an eval proxy to fight against, the code posted earlier seems to work after I added the "NO_TEST" parameter to the append tool (the schema of the featureset was not the same as the shapefile, since long field names are truncated in shapefile/DBF format)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the advice is, simply write to a fgdb featureclass...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards, Xander&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 23:35:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602025#M2870</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-12-22T23:35:48Z</dc:date>
    </item>
    <item>
      <title>Re: How do you store a feature service locally for edits?</title>
      <link>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602026#M2871</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have an operational (but still in progress) Python class that scrapes Esri REST endpoints and stores the results locally in a geodatabase (it also creates the feature class too).&amp;nbsp; It can be found &lt;A href="https://github.com/crackernutter/EsriRESTScraper"&gt;here&lt;/A&gt;.&amp;nbsp; The documentation should be pretty straightforward.&amp;nbsp; Unfortunately, I haven't solved the issue of getting all the records if the number of records is more than the max the service returns.&amp;nbsp; The only workaround I've built in is being able to specify a series of non-overlapping where queries.&amp;nbsp; Good luck - the class has a lot more work to handle other special cases, but I find it works great for a majority or our needs!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Jan 2015 18:20:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-rest-apis-and-services-questions/how-do-you-store-a-feature-service-locally-for/m-p/602026#M2871</guid>
      <dc:creator>Jay_Gregory</dc:creator>
      <dc:date>2015-01-14T18:20:42Z</dc:date>
    </item>
  </channel>
</rss>

