<?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: Programmatically update hosted feature layer in AGOL in ArcGIS Online Questions</title>
    <link>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/1063432#M40329</link>
    <description>&lt;P&gt;Hi william,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use your code to update a hosted line feature layer but I keep getting some error. I have used the same code mentioned above changing the URL, username, password, item ID, and csv file reference path.&amp;nbsp; I have added a screenshot of the error message. Could you please help me to find my mistake? I want to update a hosted feature layer with a csv file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anilbaral99_0-1622525305974.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14657i66BA4C81C15BAB55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anilbaral99_0-1622525305974.png" alt="anilbaral99_0-1622525305974.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 01 Jun 2021 05:31:51 GMT</pubDate>
    <dc:creator>anilbaral99</dc:creator>
    <dc:date>2021-06-01T05:31:51Z</dc:date>
    <item>
      <title>Programmatically update hosted feature layer in AGOL</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/377048#M18902</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am wondering what are the options for updating a hosted feature layer in AGOL. For context, I will be hosting point layer with about 500 features that will be updated nightly from a scheduled task. The initial publishing of the layer does not need to be programmatic, but the nightly update does.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have been looking into using the REST API update/delete/create endpoints for doing these nightly updates.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, are there any other options for performing these updates outside the REST API? I see there is also a Python API and Native SDKs. Are those libraries using the REST API under the hood?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 16:48:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/377048#M18902</guid>
      <dc:creator>JoeSaltenberger</dc:creator>
      <dc:date>2019-10-10T16:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically update hosted feature layer in AGOL</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/377049#M18903</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/363907"&gt;Joe Saltenberger&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ArcGIS API for Python does use the REST API under the hood. This blog goes into that in a little more depth:&amp;nbsp;&lt;A class="link-titled" href="https://www.esri.com/arcgis-blog/products/api-python/administration/arcgis-api-for-python-core-concepts-part-1/" title="https://www.esri.com/arcgis-blog/products/api-python/administration/arcgis-api-for-python-core-concepts-part-1/"&gt;ArcGIS API for Python Core Concepts Part 1: Python, APIs, and REST&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are some good resources on using the Python API to accomplish the workflow here:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/" title="https://developers.arcgis.com/python/sample-notebooks/updating-features-in-a-feature-layer/"&gt;Updating features in a feature layer | ArcGIS for Developers&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/198763-update-feature-service-with-arcgis-api-for-python"&gt;https://community.esri.com/thread/198763-update-feature-service-with-arcgis-api-for-python&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 10 Oct 2019 22:36:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/377049#M18903</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2019-10-10T22:36:09Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically update hosted feature layer in AGOL</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/377050#M18904</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The following code works for me in order to update hosted feature layer (i.e., overwrite the data):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&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
source &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"http://yourorganization.maps.arcgis.com"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"username"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"password"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; verify_cert&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;False&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
csv &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; source&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;'a4e4587122354eb2847d461263e3ccb7'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&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;'C:\TEMP\data.csv'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
csv&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;publish&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;overwrite&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="token boolean"&gt;True&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 17:24:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/377050#M18904</guid>
      <dc:creator>WilliamCraft</dc:creator>
      <dc:date>2021-12-11T17:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically update hosted feature layer in AGOL</title>
      <link>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/1063432#M40329</link>
      <description>&lt;P&gt;Hi william,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use your code to update a hosted line feature layer but I keep getting some error. I have used the same code mentioned above changing the URL, username, password, item ID, and csv file reference path.&amp;nbsp; I have added a screenshot of the error message. Could you please help me to find my mistake? I want to update a hosted feature layer with a csv file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="anilbaral99_0-1622525305974.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/14657i66BA4C81C15BAB55/image-size/medium?v=v2&amp;amp;px=400" role="button" title="anilbaral99_0-1622525305974.png" alt="anilbaral99_0-1622525305974.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 01 Jun 2021 05:31:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-online-questions/programmatically-update-hosted-feature-layer-in/m-p/1063432#M40329</guid>
      <dc:creator>anilbaral99</dc:creator>
      <dc:date>2021-06-01T05:31:51Z</dc:date>
    </item>
  </channel>
</rss>

