javarestalfrescoalfresco-webscripts

Alfresco: change document content without changing the version


I've an Alfresco Community 6.2 version and I need to update the content of some documents without incrementing the version, from an external process. I've the following behaviour now:

The nodes to be modified have aspect cm:versionable and I cannot change that; If I update the content using REST API trough this PUT https://api-explorer.alfresco.com/alfresco/api/-default-/public/alfresco/versions/1/nodes/aaa/content?majorVersion=false a new minor version is being created.

I cannot remove the aspect because otherwise also the other previous versions of that node (manually created) will be removed, and I cannot afford that.

Is there a way? or some workaround using internal java API or CMIS something??

Thanks


Solution

  • You can simply update a node's content by using

    PUT ​/nodes​/{nodeId}​/content
    

    You can disable a node's autoversioning behavior by setting "cm:autoVersion"=false

    Alfresco's version behavior is a bit different as you may expect: