<?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: Update sourceUrl for a feature service? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1498690#M10262</link>
    <description>&lt;P&gt;I've not tested this, but assuming the schema is exactly the same then you should be able to do this for your specific case (i.e., you added Enterprise Feature Services as items to your AGOL content).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "user", "passwd")

new_url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/RedlandsEmergencyVehicles/FeatureServer"
your_item_id = "4567fd6780e74ccb877fasdfghjlkl"
item = gis.content.get(your_item_id) # here the item id of the Feature Service you added to AGOL
item_properties = {"url": new_url}
item.update(item_properties=item_properties)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Coding this may not be worthwhile for a few urls. As Jake mentioned, you can do the same thing rather quickly in AGO Assistant.&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2024 21:10:50 GMT</pubDate>
    <dc:creator>EarlMedina</dc:creator>
    <dc:date>2024-06-27T21:10:50Z</dc:date>
    <item>
      <title>Update sourceUrl for a feature service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1497350#M10247</link>
      <description>&lt;P&gt;For referenced feature layers brought into AGO from our enterprise server I can access the sourceUrl using item.sourceUrl.&amp;nbsp;Is it possible to also update the sourceUrl?&lt;/P&gt;&lt;P&gt;I'd like to point the referenced feature layer at a different REST URL to update the underlying data without creating a new item and losing popup configuration, etc.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jun 2024 20:26:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1497350#M10247</guid>
      <dc:creator>ElisabethFenn</dc:creator>
      <dc:date>2024-06-25T20:26:54Z</dc:date>
    </item>
    <item>
      <title>Re: Update sourceUrl for a feature service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1498174#M10260</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/716287"&gt;@ElisabethFenn&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You can do this easily with the &lt;A href="https://ago-assistant.esri.com/" target="_self"&gt;AGOL Assistant&lt;/A&gt;.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JakeSkinner_0-1719486114646.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/108073i5295DB573A3EDCB0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JakeSkinner_0-1719486114646.png" alt="JakeSkinner_0-1719486114646.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 11:02:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1498174#M10260</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2024-06-27T11:02:00Z</dc:date>
    </item>
    <item>
      <title>Re: Update sourceUrl for a feature service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1498690#M10262</link>
      <description>&lt;P&gt;I've not tested this, but assuming the schema is exactly the same then you should be able to do this for your specific case (i.e., you added Enterprise Feature Services as items to your AGOL content).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;from arcgis.gis import GIS
gis = GIS("https://www.arcgis.com", "user", "passwd")

new_url = "https://sampleserver6.arcgisonline.com/arcgis/rest/services/RedlandsEmergencyVehicles/FeatureServer"
your_item_id = "4567fd6780e74ccb877fasdfghjlkl"
item = gis.content.get(your_item_id) # here the item id of the Feature Service you added to AGOL
item_properties = {"url": new_url}
item.update(item_properties=item_properties)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Coding this may not be worthwhile for a few urls. As Jake mentioned, you can do the same thing rather quickly in AGO Assistant.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2024 21:10:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1498690#M10262</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2024-06-27T21:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: Update sourceUrl for a feature service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1502962#M10317</link>
      <description>&lt;P&gt;Thanks for the ideas &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/10527"&gt;@JakeSkinner&lt;/a&gt;&amp;nbsp;and &lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/86309"&gt;@EarlMedina&lt;/a&gt;!&lt;/P&gt;&lt;P&gt;I've tried both these methods and haven't been able to get either to work. My first thought had also been to use AGO assistant, but I'm trying to change the source URL for an item, not in a layer in a web map. When I go to the item details in AGO assistant, I can edit the JSON and change the source URL but the changes don't actually stick when I save them.&lt;/P&gt;&lt;P&gt;The code suggested here throws an error I've run into before trying to figure this out:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Screenshot 2024-07-09 090912.png" style="width: 832px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/109185i1E2B4AF3EF4E7E54/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2024-07-09 090912.png" alt="Screenshot 2024-07-09 090912.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 09 Jul 2024 13:11:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1502962#M10317</guid>
      <dc:creator>ElisabethFenn</dc:creator>
      <dc:date>2024-07-09T13:11:45Z</dc:date>
    </item>
    <item>
      <title>Re: Update sourceUrl for a feature service?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1560556#M10899</link>
      <description>&lt;P&gt;Just want to confirm I've encountered the same issue. I've tried using ArcGIS Online itself, AGO Assistant, Geo Jobe and the ArcGIS API for Python. All methods appear to save the changes, but the changes don't persist and the source URL remains the same.&lt;/P&gt;&lt;P&gt;There appears to be no way to update the source URL for in a referenced feature layer.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Nov 2024 00:04:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-sourceurl-for-a-feature-service/m-p/1560556#M10899</guid>
      <dc:creator>BrynR</dc:creator>
      <dc:date>2024-11-20T00:04:33Z</dc:date>
    </item>
  </channel>
</rss>

