<?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: How to update the item properties from metadata using the Python API? in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/1066965#M6189</link>
    <description>&lt;P&gt;Hi Egge-Jan,&lt;BR /&gt;Thank you for posting your script file... very useful.&lt;/P&gt;&lt;P&gt;Question: what do you use as a resource to identify the name of the metadata item eg. 'snippet' or 'licenseInfo'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if I wanted to update:&amp;nbsp;metadata &amp;gt; Resource &amp;gt; Citation &amp;gt; Titles &amp;amp; Dates &amp;gt; Revision Date - see screencap - what would be the keyword to use in the 'dictitem_properties' in the script.&lt;/P&gt;&lt;P&gt;cheers,&lt;BR /&gt;Greg&lt;/P&gt;</description>
    <pubDate>Thu, 10 Jun 2021 16:09:35 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-06-10T16:09:35Z</dc:date>
    <item>
      <title>How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800764#M2046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Through the ArcGIS Portal UI, when I edit the metadata for a portal item, the item's properties are updated when I save the metadata record:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/440219_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/440220_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/440221_pastedImage_3.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, when I update the item's metadata from the Python API, the item's properties are not updated. I've used the following 2 methods to update the item's metadata:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #bbbbbb; background-color: #002b36; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;item.metadata &lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt; esri_metadata_file_name&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="color: #bbbbbb; background-color: #002b36; font-family: Consolas, 'Courier New', monospace; font-weight: normal; font-size: 14px; line-height: 19px; white-space: pre;"&gt;&lt;DIV&gt;&lt;SPAN style="color: #bbbbbb;"&gt;item.update (metadata&lt;/SPAN&gt;&lt;SPAN style="color: #859900;"&gt;=&lt;/SPAN&gt;&lt;SPAN style="color: #bbbbbb;"&gt;esri_metadata_file_name)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a way to, using the Python API, to update the item's properties when the metadata is updated?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Mar 2019 20:40:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800764#M2046</guid>
      <dc:creator>JonathanBailey</dc:creator>
      <dc:date>2019-03-22T20:40:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800765#M2047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Good morning Jonathan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at the example below. This script allows you to get your item and to update metadata items like the snippet, the description, the Terms of Use, the credits and one or more tags.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;HTH,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&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;# Log in to ArcGIS Online&lt;/SPAN&gt;
my_agol &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;"https://www.arcgis.com"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; username&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; password&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Get your item&lt;/SPAN&gt;
my_item &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; my_agol&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;'&amp;lt;itemID&amp;gt;'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Define metadata&lt;/SPAN&gt;
service_snippet &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Here you can put a short snippet describing the Feature Layer'&lt;/SPAN&gt;
service_description &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'Here you can put a description of the Feature Layer'&lt;/SPAN&gt;
service_terms_of_use &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'FOR INTERNAL USE ONLY'&lt;/SPAN&gt;
service_credits &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'© Me, myself and I'&lt;/SPAN&gt;
service_tags &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Railway'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'Canada'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Create update dict&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;'snippet'&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; service_snippet&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                   &lt;SPAN class="string token"&gt;'description'&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; service_description&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                   &lt;SPAN class="string token"&gt;'licenseInfo'&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; service_terms_of_use&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                   &lt;SPAN class="string token"&gt;'accessInformation'&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; service_credits&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;
                   &lt;SPAN class="string token"&gt;'tags'&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; service_tags&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# Apply update&lt;/SPAN&gt;
my_item&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;update&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;item_properties&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;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;H2 id="toc-hId-1816362974"&gt;Modified Metadata&lt;/H2&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Via &lt;STRONG&gt;Child Resources &amp;gt; Info &amp;gt; Metadata&lt;/STRONG&gt; you will get to an XML with your modified values (see screen dumps below).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-3 jive-image" src="https://community.esri.com/legacyfs/online/440301_pastedImage_6.png" /&gt;&lt;IMG class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/440300_pastedImage_5.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/440299_pastedImage_4.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 09:16:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800765#M2047</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2021-12-12T09:16:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800766#M2048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Egge-Jan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, I'm trying to go in the other direction. I have an XML metadata document that I'm applying to the item. I'm wishing to have the item properties updated without having to write additional code to parse the XML and explicitly set the properties on the item.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Jon.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 16:53:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800766#M2048</guid>
      <dc:creator>JonathanBailey</dc:creator>
      <dc:date>2019-03-25T16:53:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800767#M2049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;OK - would not know how to accomplish that. Let's see what others have to say about it...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 16:59:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800767#M2049</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2019-03-25T16:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800768#M2050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;What version of the Python API are you using? Can you try the item.update with version 1.5.1 of the Python API? The newest version 1.6.0 did not work for me but 1.5.1 did.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2019 20:20:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800768#M2050</guid>
      <dc:creator>MunachisoOgbuchiekwe</dc:creator>
      <dc:date>2019-03-25T20:20:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800769#M2051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Munacghiso,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Partial success -- I was using v1.6.0, so I went back to v1.5.1, and I'm now able to get the Description of the item to update. Other attributes, such as Credits, are still not updating, however.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2019 11:52:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800769#M2051</guid>
      <dc:creator>JonathanBailey</dc:creator>
      <dc:date>2019-03-26T11:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800770#M2052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you please confirm if you are able to update (overwrite) the metadata successfully by providing the local metadata file in the user interface of ArcGIS Online?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If yes, then you can track the network request to extract the URL and the parameters and send an https request using requests python module.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You would also need token, so use REST API again to generate token.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 01 Apr 2019 08:53:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800770#M2052</guid>
      <dc:creator>GurminderBharani1</dc:creator>
      <dc:date>2019-04-01T08:53:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800771#M2053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also use XML metadata file to maintain ArcGIS online metadata. Take a look at my &lt;A href="https://github.com/hansurfer/AGOL_Metadata"&gt;GitHub&amp;nbsp;repo&lt;/A&gt;.&amp;nbsp;It works with version 1.5.2&amp;nbsp; (haven't tested with 1.6.0).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Apr 2019 18:40:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800771#M2053</guid>
      <dc:creator>SanghongYoo1</dc:creator>
      <dc:date>2019-04-02T18:40:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800772#M2054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems to be working for most metadata XML files I try, but there are a few where only uploading through ArcGIS Online manually works. This is at version 1.7.1 of the python API.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2020 23:37:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/800772#M2054</guid>
      <dc:creator>sweston_doc</dc:creator>
      <dc:date>2020-07-14T23:37:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to update the item properties from metadata using the Python API?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/1066965#M6189</link>
      <description>&lt;P&gt;Hi Egge-Jan,&lt;BR /&gt;Thank you for posting your script file... very useful.&lt;/P&gt;&lt;P&gt;Question: what do you use as a resource to identify the name of the metadata item eg. 'snippet' or 'licenseInfo'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For example, if I wanted to update:&amp;nbsp;metadata &amp;gt; Resource &amp;gt; Citation &amp;gt; Titles &amp;amp; Dates &amp;gt; Revision Date - see screencap - what would be the keyword to use in the 'dictitem_properties' in the script.&lt;/P&gt;&lt;P&gt;cheers,&lt;BR /&gt;Greg&lt;/P&gt;</description>
      <pubDate>Thu, 10 Jun 2021 16:09:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/how-to-update-the-item-properties-from-metadata/m-p/1066965#M6189</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-06-10T16:09:35Z</dc:date>
    </item>
  </channel>
</rss>

