<?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 online service overwrite using python API in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860487#M4175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the update method on an item to overwrite a csv on AGOL. Something like this might work for you.....&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Grab the id of the csv&lt;/SPAN&gt;
csv &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'ef220b9f500348e5867095d10fe751e5'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Call the update method to replace/overwrite it with a csv file from disk&lt;/SPAN&gt;
csv&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'path to csv file from disk'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read up more on the parameters of the update method on the API documentation page (&lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html#arcgis.gis.Item.update" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html#arcgis.gis.Item.update" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis.gis module — arcgis 1.5.0 documentation&lt;/A&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 10:40:12 GMT</pubDate>
    <dc:creator>MunachisoOgbuchiekwe</dc:creator>
    <dc:date>2021-12-12T10:40:12Z</dc:date>
    <item>
      <title>Arcgis online service overwrite using python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860482#M4170</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, we frequently use de 'overwrite' function in AGOL interface in order to update a feature service content, based on a .shp or .csv original file.&lt;/P&gt;&lt;P&gt;We now would need to perform this same function using the Arcgis API for python. Can you please specify what modules, classes functions are needed. A sample code would be greta.&lt;/P&gt;&lt;P&gt;Please note we need to &lt;STRONG&gt;update / overwrite from a file&lt;/STRONG&gt; (shape, csv) not a .mxd or geodatase.&lt;/P&gt;&lt;P&gt;Thanks a lot in advanced!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2016 14:15:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860482#M4170</guid>
      <dc:creator>unica360</dc:creator>
      <dc:date>2016-09-22T14:15:41Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis online service overwrite using python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860483#M4171</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe this can be accomplished using ArcREST:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://github.com/Esri/ArcREST/blob/master/samples/update_item.py" title="https://github.com/Esri/ArcREST/blob/master/samples/update_item.py"&gt;ArcREST/update_item.py at master · Esri/ArcREST · GitHub&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Sep 2016 14:54:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860483#M4171</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2016-09-22T14:54:20Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis online service overwrite using python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860484#M4172</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Attached Notebook Shows how ot do this exclusively in the Python API for ArcGIS.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Mar 2017 13:54:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860484#M4172</guid>
      <dc:creator>AndrewHargreaves</dc:creator>
      <dc:date>2017-03-08T13:54:02Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis online service overwrite using python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860485#M4173</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Andrew (great name, btw)!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Will your sample work for .MXDs as well? Currently my script is a good bit more 'complex' (i.e. a good bit longer), but if I could simplify my code by using the provided sample as is (or with slight modification), it'd make everyone happier!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it needs to be modified, would you mind pointing me in the right direction? Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 May 2018 16:18:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860485#M4173</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2018-05-02T16:18:52Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis online service overwrite using python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860486#M4174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the&amp;nbsp;Python API for ArcGIS solution.&amp;nbsp; However, I still can't figure out if there's a way to overwrite a csv on AGOL.&amp;nbsp; I found a method for overwriting a feature layer, but not a csv.&amp;nbsp; Any help is much appreciated!&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2018 04:09:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860486#M4174</guid>
      <dc:creator>DanielAragon1</dc:creator>
      <dc:date>2018-08-17T04:09:21Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis online service overwrite using python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860487#M4175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Daniel,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use the update method on an item to overwrite a csv on AGOL. Something like this might work for you.....&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcgis
&lt;SPAN class="keyword token"&gt;from&lt;/SPAN&gt; arcgis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;gis &lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; GIS

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Grab the id of the csv&lt;/SPAN&gt;
csv &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;content&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;get&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'ef220b9f500348e5867095d10fe751e5'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Call the update method to replace/overwrite it with a csv file from disk&lt;/SPAN&gt;
csv&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;'path to csv file from disk'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can read up more on the parameters of the update method on the API documentation page (&lt;A class="link-titled" href="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html#arcgis.gis.Item.update" title="https://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.toc.html#arcgis.gis.Item.update" rel="nofollow noopener noreferrer" target="_blank"&gt;arcgis.gis module — arcgis 1.5.0 documentation&lt;/A&gt;).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 10:40:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860487#M4175</guid>
      <dc:creator>MunachisoOgbuchiekwe</dc:creator>
      <dc:date>2021-12-12T10:40:12Z</dc:date>
    </item>
    <item>
      <title>Re: Arcgis online service overwrite using python API</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860488#M4176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Please refer the sample:&lt;/P&gt;&lt;P&gt;&lt;A href="https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/#Apply-edits-from-third-spreadsheet"&gt;https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/#Apply-edits-from-third-spreadsheet&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Apr 2019 09:23:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/arcgis-online-service-overwrite-using-python-api/m-p/860488#M4176</guid>
      <dc:creator>GurminderBharani1</dc:creator>
      <dc:date>2019-04-01T09:23:50Z</dc:date>
    </item>
  </channel>
</rss>

