<?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 Lost version history when update file properties in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/lost-version-history-when-update-file-properties/m-p/98819#M28777</link>
    <description>&lt;P&gt;Hi guy , I apologize I am really alfresco newbie. I try to update file properties with REST API. But allways I lost all version history. I cannot find any parametr in swagger which can help me.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Oct 2020 12:38:11 GMT</pubDate>
    <dc:creator>TomasHorvath</dc:creator>
    <dc:date>2020-10-29T12:38:11Z</dc:date>
    <item>
      <title>Lost version history when update file properties</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/lost-version-history-when-update-file-properties/m-p/98819#M28777</link>
      <description>&lt;P&gt;Hi guy , I apologize I am really alfresco newbie. I try to update file properties with REST API. But allways I lost all version history. I cannot find any parametr in swagger which can help me.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 12:38:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/lost-version-history-when-update-file-properties/m-p/98819#M28777</guid>
      <dc:creator>TomasHorvath</dc:creator>
      <dc:date>2020-10-29T12:38:11Z</dc:date>
    </item>
    <item>
      <title>Re: Lost version history when update file properties</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/lost-version-history-when-update-file-properties/m-p/98820#M28778</link>
      <description>&lt;P&gt;With the info you have shared, it could be possible that you are not using the APIs properly and somehow &lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/resources/alfresco/model/contentModel.xml#L1022" target="_blank" rel="noopener nofollow noreferrer"&gt;cm:versiobable aspect&lt;/A&gt; is getting removed. Could you check whether cm:versionable aspect is present on the document where you are seeing this issue? you can use node browser to check that or use below api call with nodeRefId param:&lt;/P&gt;
&lt;PRE&gt;This would return a list of aspects in the response, you can check cm:versionable aspect presence:&lt;BR /&gt;&lt;BR /&gt;http://127.0.0.1:8080&lt;STRONG&gt;/alfresco/service/api/metadata&lt;/STRONG&gt;?&lt;STRONG&gt;nodeRef=workspace://SpacesStore/902413b5-b3ed-4a88-afed-6b44f88a78d5&lt;/STRONG&gt;&lt;/PRE&gt;
&lt;P&gt;Also can you make sure there are no change to following properties, these are default settings:&lt;/P&gt;
&lt;PRE&gt;&lt;A href="https://github.com/Alfresco/alfresco-community-repo/blob/master/repository/src/main/resources/alfresco/repository.properties#L368" target="_blank" rel="noopener nofollow noreferrer"&gt;# ADM VersionStore Configuration&lt;/A&gt;&amp;nbsp;&lt;BR /&gt;version.store.initialVersion=true
version.store.enableAutoVersioning=true
version.store.enableAutoVersionOnUpdateProps=false&lt;/PRE&gt;
&lt;P&gt;If you want&amp;nbsp; a new version to be created on update of one/more properties, you can enable it in alfresco-global.properties:&lt;/P&gt;
&lt;PRE&gt;version.store.enableAutoVersionOnUpdateProps=true&lt;/PRE&gt;
&lt;P&gt;To understand more on how these properties work, refer this post:&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/version-history-does-not-include-property-updates/m-p/297112/highlight/true#M18250" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/version-history-does-not-include-property-updates/m-p/297112/highlight/true#M18250&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;&lt;U&gt;Have a look at these V1 REST APIs:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;To upload a file:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-upload-file.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-upload-file.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;To upload a new version of a file:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-upload-file-new-version.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-upload-file-new-version.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;To update the properties:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-update-node-metadata.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-update-node-metadata.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Just follow the instructions and try the sample URLs as provided to under the working of APIs.&lt;/P&gt;
&lt;P&gt;All file/folder management APIs can be found here:&amp;nbsp;&lt;A href="https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-mng-folders-files.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-mng-folders-files.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Oct 2020 20:58:46 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/lost-version-history-when-update-file-properties/m-p/98820#M28778</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-10-29T20:58:46Z</dc:date>
    </item>
  </channel>
</rss>

