<?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 Upload new source data for existing layer in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-new-source-data-for-existing-layer/m-p/871009#M4652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok my workflow is this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I have existing feature layers all symbolized and popups set nicely in my AGOL account&lt;/LI&gt;&lt;LI&gt;Every month I want to refresh the data within&lt;/LI&gt;&lt;LI&gt;I would like to make a copy of the layer to a new month - remove the data and upload the new data&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use the API to publish the new data as a new layer, name it and put it in the right folder. But all my symbology is now default symbol and I want to re-use the existing symbology.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So can I:&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;save the symbology definition and use that to set this on the new layer as i upload it.&lt;/LI&gt;&lt;LI&gt;or, somehow delete all features from the old layer and load in the new features - hence layer setting such as symbology stays&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 27 Mar 2017 09:28:40 GMT</pubDate>
    <dc:creator>AlistairFox</dc:creator>
    <dc:date>2017-03-27T09:28:40Z</dc:date>
    <item>
      <title>Upload new source data for existing layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-new-source-data-for-existing-layer/m-p/871009#M4652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok my workflow is this:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;I have existing feature layers all symbolized and popups set nicely in my AGOL account&lt;/LI&gt;&lt;LI&gt;Every month I want to refresh the data within&lt;/LI&gt;&lt;LI&gt;I would like to make a copy of the layer to a new month - remove the data and upload the new data&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can use the API to publish the new data as a new layer, name it and put it in the right folder. But all my symbology is now default symbol and I want to re-use the existing symbology.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So can I:&lt;/P&gt;&lt;OL style="list-style-type: lower-alpha;"&gt;&lt;LI&gt;save the symbology definition and use that to set this on the new layer as i upload it.&lt;/LI&gt;&lt;LI&gt;or, somehow delete all features from the old layer and load in the new features - hence layer setting such as symbology stays&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 09:28:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-new-source-data-for-existing-layer/m-p/871009#M4652</guid>
      <dc:creator>AlistairFox</dc:creator>
      <dc:date>2017-03-27T09:28:40Z</dc:date>
    </item>
    <item>
      <title>Re: Upload new source data for existing layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-new-source-data-for-existing-layer/m-p/871010#M4653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Both the options you described is possible with the Python API.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For option a - save symbology:&lt;/STRONG&gt; In a feature layer, your symbology can be stored in two places 1) The web feature layer's definition 2) portal Item's data resource. Refer to the guide on&amp;nbsp;&lt;A href="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.features.managers.html#arcgis.features.managers.FeatureLayerManager"&gt;FeatureLayerManager&lt;/A&gt;&amp;nbsp;to find how to read &amp;amp; update definitions of a feature layer, this is useful if symbology and pop-ups is stored in the feature layer's definition. If your template has it stored in the item, access the data resource&amp;nbsp;&lt;A href="http://esri.github.io/arcgis-python-api/apidoc/html/arcgis.gis.html#arcgis.gis.Item.get_data"&gt;using Item.get_data()&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;For option b - update just the features&lt;/STRONG&gt;: To perform this, refer to the&amp;nbsp;&lt;A href="https://developers.arcgis.com/python/guide/editing-features/"&gt;guide on editing features&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;Both of these use cases are popular, over the next few update cycles, we will consider writing them as samples or guide chapters.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Mar 2017 14:19:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-new-source-data-for-existing-layer/m-p/871010#M4653</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2017-03-27T14:19:25Z</dc:date>
    </item>
    <item>
      <title>Re: Upload new source data for existing layer</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-new-source-data-for-existing-layer/m-p/871011#M4654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Atma&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's definitely put me on the right path. I can get the json dict properties of the old and new layers. But I'm stuggling with the update_definition.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I update just the drawing definition part to use the previously set symbol. As below.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried saving this to a json file and loading in an applying to update_definition but get an unable to retrieve feature error. Your right, a worked example here would really help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also; when i go to get the properties of the layer i get a token error. how do i generate a token and pass thru.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; "drawingInfo": {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "labelingInfo": null,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "transparency": 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; "renderer": {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type": "simple",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "symbol": {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "imageData": "iVBORw0KGgoAAAANSUhEUgAAABsAAAAaCAYAAABGiCfwAAAAAXNSR0IB2cksfwAAAAlwSFlzAAAOxAAADsQBlSsOGwAAArxJREFUSInllUtIlFEUx3/aaDI6YyM6OhIIMdBzGxS0y6BVbqKFi6igDJLQspBeM1qMlkEhCG6yVi3aROuGWlS79rYYopFstOIba+abmW8e32lx5/3QVHLTgQvnu4//755z7nevhS00y/8Niz2eEURQzaTgqyaRKM33PHWbgmk9u6Xp0gAYiYIwAhTDgMZG9LEJMWaf0BYK1ITWhOkT9wURJGUoQROsF34AQmy2HevAsupEiM10gAjbz/ajI9Lsu1sVWBWmj/kEIw0iWC8uFQTNuJqQTIAksrNNMFJYh5aADLGHTvTh69L86EEFsAKm3/QIRgIQrIPLKqqsIJIEMhA3QIz8mLlPy8KFFV3Hvs2C5nJLeUorIzNSCjQcIjblxHpVpavp5CKIGrMc1MA0AJPoZActo9/VwQHsGRMySRqOH4WngdqRRQZHxIwnWDm9hFXAemUhL1LfLXm/8Ui8ELGeyqc0ctuJbXwBMInc6OR3/xmxP39WVxVGKg4i7Ow2wFTCUY+TlrElJXCnE9tYqFArTCSZzKbXBCMNqLqm37yvSFoJTIyUEr21A9u4ArR4C9GRTAHZumWBNt8XEAgf/orD/xqiOTV3bZjmcgtJA+18kJ5dDUSudWGbWgRMfo90Y5/6hs33GaLvKkQAHP6CH+514/AHCPeWAksiS7/9QLQvAE6weSB8SC2yewG9EhDu68HxKshPbxvtXq0EVM1WvUEc/gC/zvXQOhesKtL6MgjwV6ASWFsoUKe53NI95ObF5QCnTmQF54J5MIA26qJtUh2S+vqiKMtA5SmsiCwHPDbtJjxN1V3mQOWWm1sMWfOnzgGr7XYtWw1UFVYO3IjVuvnXfM8+zcOevRvFrhMmOsx/LHybTbD/gPKL+wG6NgvrGq08VeFVxDf0eNZaVFzL1YTXBVvvJv4JbDO2pbA/1VNr5+fX+kYAAAAASUVORK5CYII=",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "xoffset": 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "width": 20,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "contentType": "image/png",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "type": "esriPMS",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "height": 19,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "yoffset": 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "angle": 0,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "url": "632a2675cb74c05e5734e3b8b2acdcf2"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "label": "",&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "description": ""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/P&gt;&lt;P&gt;&amp;nbsp; },&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Mar 2017 02:06:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/upload-new-source-data-for-existing-layer/m-p/871011#M4654</guid>
      <dc:creator>AlistairFox</dc:creator>
      <dc:date>2017-03-28T02:06:04Z</dc:date>
    </item>
  </channel>
</rss>

