<?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 service URLs in Web Map in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850438#M3810</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for providing the code snippet.&amp;nbsp; Is there any chance you could migrate the server, yet utilize the same urls using aliases and/or the web adaptor for routing web traffic with the same url from a different server?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Jan 2020 11:59:13 GMT</pubDate>
    <dc:creator>MichaelVolz</dc:creator>
    <dc:date>2020-01-17T11:59:13Z</dc:date>
    <item>
      <title>Update service URLs in Web Map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850436#M3808</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Due to a server migration, I need to update all the service URLs to the new server.&amp;nbsp; The script runs, however, I do not see the update for the layers in the web map.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I took a look at this &lt;A _jive_internal="true" href="https://community.esri.com/message/758904-change-a-feature-layer-url#comment-806474"&gt;post&lt;/A&gt; and attempted to implement but still no update.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone please assist.&amp;nbsp; Posted code below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #bbbbbb; background-color: #002b36; font-weight: normal; font-size: 14px;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #859900;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;arcgis.gis&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #859900;"&gt;from&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;arcgis.mapping&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;WebMap&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #859900;"&gt;import&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;os&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #859900;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;__name__&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;==&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;"__main__"&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gis&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;arcgis.gis.GIS(orgportalURL,UN,Passowrd)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;user&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;gis.users.get(UN)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;"Successfully&amp;nbsp;Logged&amp;nbsp;in&amp;nbsp;as&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;user[&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'username'&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;webMapID&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;"036292a6eb7b4bdFakeWEBMAP"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;"Gaining&amp;nbsp;attributes&amp;nbsp;for&amp;nbsp;web&amp;nbsp;map:&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;str&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;(webMapID))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Webmap&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;gis.content.get(&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;str&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;(webMapID))&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;wm&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;WebMap(Webmap)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;loop&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d33682;"&gt;0&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;layer&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;wm.layers:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;upd&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;layer&lt;/SPAN&gt;&lt;/DIV&gt;&lt;BR /&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gisenturl&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'https://fakeportalname/fakeserver/rest/services/Environmental'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;gisviewurl&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'https://anotherfakeportalname/anotherfakeserver/rest/services/Environmental'&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;if&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;gisenturl&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;layer[&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'url'&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;]:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&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;wm.layers[loop][&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'url'&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;]&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;layer[&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'url'&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;].replace(gisenturl,gisviewurl)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&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;gis.update_properties(wm.layers[&lt;/SPAN&gt;&lt;SPAN style="color: #d33682;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&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;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;print&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;(&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;"Service&amp;nbsp;Updated&amp;nbsp;for&amp;nbsp;"&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;+&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;layer[&lt;/SPAN&gt;&lt;SPAN style="color: #2aa198;"&gt;'title'&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;])&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;loop&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;+=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="color: #d33682;"&gt;1&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2020 01:20:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850436#M3808</guid>
      <dc:creator>JosephRoberts2</dc:creator>
      <dc:date>2020-01-17T01:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Update service URLs in Web Map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850437#M3809</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Does it help if you save the webmap with using update directly. I just answered to similar case where layer level properties are added and saved to the webmap (with different property on the layer though) in&amp;nbsp;&lt;A _jive_internal="true" class="link-titled" href="https://community.esri.com/thread/246654-setting-the-refresh-interval-for-a-hosted-feature-layer#comment-902703" title="https://community.esri.com/thread/246654-setting-the-refresh-interval-for-a-hosted-feature-layer#comment-902703"&gt;https://community.esri.com/thread/246654-setting-the-refresh-interval-for-a-hosted-feature-layer#comment-902703&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;webmap&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="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2020 08:00:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850437#M3809</guid>
      <dc:creator>AnttiKajanus3</dc:creator>
      <dc:date>2020-01-17T08:00:17Z</dc:date>
    </item>
    <item>
      <title>Re: Update service URLs in Web Map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850438#M3810</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for providing the code snippet.&amp;nbsp; Is there any chance you could migrate the server, yet utilize the same urls using aliases and/or the web adaptor for routing web traffic with the same url from a different server?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2020 11:59:13 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850438#M3810</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2020-01-17T11:59:13Z</dc:date>
    </item>
    <item>
      <title>Re: Update service URLs in Web Map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850439#M3811</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That should be&amp;nbsp;ok. I'm no means on expert on that topic but you could start from &lt;A href="https://enterprise.arcgis.com/en/server/latest/deploy/windows/migration-checklist.htm#ESRI_SECTION1_F8E338665DDD40F3B924002F91DE6DE2"&gt;this&lt;/A&gt;&amp;nbsp;page.&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;You need to determine the URL format used by your existing apps when connecting to&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN class="" style="color: #4c4c4c; background-color: #ffffff;"&gt;ArcGIS Server&lt;/SPAN&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;. This will help you understand whether your apps need to be modified after the upgrade. Using&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;A href="https://enterprise.arcgis.com/en/server/latest/deploy/windows/about-the-arcgis-web-adaptor.htm" style="color: #0074b8; background-color: #ffffff; text-decoration: none;"&gt;&lt;SPAN class=""&gt;ArcGIS Web Adaptor&lt;/SPAN&gt;&lt;/A&gt;&lt;SPAN style="color: #4c4c4c; background-color: #ffffff;"&gt;, you can engineer your site to match the URLs you used at earlier versions, thereby saving yourself the time and effort of updating all your app code.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2020 13:30:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850439#M3811</guid>
      <dc:creator>AnttiKajanus3</dc:creator>
      <dc:date>2020-01-17T13:30:23Z</dc:date>
    </item>
    <item>
      <title>Re: Update service URLs in Web Map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850440#M3812</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Joseph,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you added the layers to your web map from items in your Portal, you may want to consider updating the item itself rather than just the layer in the web map:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note:&amp;nbsp; Hosted feature service URLs cannot be updated&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

&lt;SPAN class="comment token"&gt;# Variables&lt;/SPAN&gt;
admin &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'portaladmin'&lt;/SPAN&gt;
password &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'*****'&lt;/SPAN&gt;
portal &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'https://gis.esri.com/portal'&lt;/SPAN&gt;
gisenturl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'https://gis-stagin.esri.com/arcgis'&lt;/SPAN&gt;
gisviewurl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'https://gis.esri.com/arcgis'&lt;/SPAN&gt;
targetUser &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'jskinner'&lt;/SPAN&gt;

gis &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; GIS&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;portal&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; admin&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&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;

users &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; gis&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;users&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;search&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;targetUser&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; user &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; users&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
    content &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; user&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;items&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; layer &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'hosted'&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;not&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; gisenturl &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
               updateURL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;replace&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gisenturl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gisviewurl&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
               layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_properties&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'url'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;updateURL&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
               &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Updated {0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
    folders &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; user&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;folders
    &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; folder &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; folders&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
        content &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; user&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;items&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;folder&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;folder&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'title'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; layer &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; content&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; gisenturl &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
               updateURL &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;url&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;replace&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;gisenturl&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; gisviewurl&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
               layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_properties&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'url'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;updateURL&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
               &lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Updated {0}"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;format&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;layer&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;title&lt;SPAN class="punctuation token"&gt;)&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;/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;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;/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>Sun, 12 Dec 2021 10:27:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850440#M3812</guid>
      <dc:creator>JakeSkinner</dc:creator>
      <dc:date>2021-12-12T10:27:30Z</dc:date>
    </item>
    <item>
      <title>Re: Update service URLs in Web Map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850441#M3813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Antii.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I added the wm.update() which essentially saved the webmap, which updated the service URLs.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Jan 2020 15:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/850441#M3813</guid>
      <dc:creator>JosephRoberts2</dc:creator>
      <dc:date>2020-01-17T15:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: Update service URLs in Web Map</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/1659466#M11744</link>
      <description>&lt;P&gt;Can you explain the advantage of this route? We just migrated from one hosting server to two (added a dedicated map image server). Our system admins cloned everything so now I have two of every service in portal; one on the old hosting server and one on the new map server. These are all reference registered feature services and the database has not moved. I'm not sure why this approach was taken but now I need to repoint all the data in my web maps to the services on the new server. I was thinking that I might be able to use the API to do this? Looping through all of my content to build an old server:new server dict and then looping through my maps, and using the dict to replace the old server URLs. Most maps have a high level of customization for symbology, pop ups, etc. so I really don't want to start over from scratch. Another thought I had was editing the JSON to update URL and itemID for the operational layers, but that seems less certain and more sketchy. Any advice is appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Oct 2025 20:21:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/update-service-urls-in-web-map/m-p/1659466#M11744</guid>
      <dc:creator>JamesTurner2</dc:creator>
      <dc:date>2025-10-21T20:21:49Z</dc:date>
    </item>
  </channel>
</rss>

