<?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 Change a feature layer Url in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/change-a-feature-layer-url/m-p/789030#M1535</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to change the Url of a FeatureLayer?&amp;nbsp; For example, changing&lt;/P&gt;&lt;P&gt;"&lt;A class="link-titled" href="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1" title="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1"&gt;https://oldserver/arcgis/rest/services/myfolder/mymapservice/MapServer/1&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;"&lt;A href="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1" style="color: #2989c5; text-decoration: none;" title="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1"&gt;https://newserver/arcgis/rest/services/myfolder/mymapservice/MapServer/1&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fLyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;manager&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update_definition&lt;SPAN class="punctuation 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;sNewLayerUrl &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;P&gt;I get "RuntimeError: Invalid URL (Error Code: 400)".&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 22 Mar 2018 20:09:11 GMT</pubDate>
    <dc:creator>MarkCederholm</dc:creator>
    <dc:date>2018-03-22T20:09:11Z</dc:date>
    <item>
      <title>Change a feature layer Url</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/change-a-feature-layer-url/m-p/789030#M1535</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is it possible to change the Url of a FeatureLayer?&amp;nbsp; For example, changing&lt;/P&gt;&lt;P&gt;"&lt;A class="link-titled" href="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1" title="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1"&gt;https://oldserver/arcgis/rest/services/myfolder/mymapservice/MapServer/1&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;to&lt;/P&gt;&lt;P&gt;"&lt;A href="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1" style="color: #2989c5; text-decoration: none;" title="https://tuswpesri05/arcgis/rest/services/UES/AZGas/MapServer/1"&gt;https://newserver/arcgis/rest/services/myfolder/mymapservice/MapServer/1&lt;/A&gt;"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="language-python line-numbers"&gt;&lt;CODE&gt;fLyr&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;manager&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update_definition&lt;SPAN class="punctuation 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;sNewLayerUrl &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;P&gt;I get "RuntimeError: Invalid URL (Error Code: 400)".&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 22 Mar 2018 20:09:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/change-a-feature-layer-url/m-p/789030#M1535</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2018-03-22T20:09:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change a feature layer Url</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/change-a-feature-layer-url/m-p/789031#M1536</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hello Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;don't go so far, you don't need to go until the FeatureLayer object&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Stay at the "Item" level, you just have to&amp;nbsp;change the Item properties&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;item.update(item_properties={'url':newUrlString})&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 10:21:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/change-a-feature-layer-url/m-p/789031#M1536</guid>
      <dc:creator>MarcLEMAIRE</dc:creator>
      <dc:date>2018-10-16T10:21:07Z</dc:date>
    </item>
    <item>
      <title>Re: Change a feature layer Url</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/change-a-feature-layer-url/m-p/789032#M1537</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It works, thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Oct 2018 14:32:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/change-a-feature-layer-url/m-p/789032#M1537</guid>
      <dc:creator>MarkCederholm</dc:creator>
      <dc:date>2018-10-16T14:32:16Z</dc:date>
    </item>
  </channel>
</rss>

