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.
With the info you have shared, it could be possible that you are not using the APIs properly and somehow cm:versiobable aspect 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:
This would return a list of aspects in the response, you can check cm:versionable aspect presence:
http://127.0.0.1:8080/alfresco/service/api/metadata?nodeRef=workspace://SpacesStore/902413b5-b3ed-4a88-afed-6b44f88a78d5
Also can you make sure there are no change to following properties, these are default settings:
# ADM VersionStore Configuration
version.store.initialVersion=true version.store.enableAutoVersioning=true version.store.enableAutoVersionOnUpdateProps=false
If you want a new version to be created on update of one/more properties, you can enable it in alfresco-global.properties:
version.store.enableAutoVersionOnUpdateProps=true
To understand more on how these properties work, refer this post: https://hub.alfresco.com/t5/alfresco-content-services-forum/version-history-does-not-include-propert...
Have a look at these V1 REST APIs:
To upload a file: https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-upload-file.html
To upload a new version of a file: https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-upload-file-new-version.html
To update the properties: https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-update-node-metadata.html
Just follow the instructions and try the sample URLs as provided to under the working of APIs.
All file/folder management APIs can be found here: https://docs.alfresco.com/5.2/concepts/dev-api-by-language-alf-rest-mng-folders-files.html
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.