REST API always applies versioning
The current behaviour of the createNode REST API is:
Creating an empty file without content (via POST JSON) is not auto-versioned, and any subsequent file content updates are not versioned
creating a file with content (via POST of multipart/form-data) is always auto-versioned, and any subsequent file content updates are versioned
Is is not possible to create a node with content without having the versonable aspect automatically applied. This inconsistent but more importantly it results in very significant DB bloat for this unwanted version data.
The createNode API needs an option to allow control over versioning being applied whist preserving the existing behaviour if the call is used as per the current implementation.
Repository HF 22.214.171.124 has just been released.
Artifacts can be found on:
Nexus (Alfresco Enterprise Releases/org/alfresco/alfresco-content-services-distribution/126.96.36.199)
I`ll continue with merging to 6.2.N branch.
Big thanks to who put tremendous effort constantly reviewing and improving the solution.
https://github.com/Alfresco/alfresco-community-repo/pull/149 has been merged to master branch.
I have created:
- for release/6.2.2
- for 6.2.N
API Spec has been updated in the following PRs:
- for master
- for 6.2.N
I have started the release process for 188.8.131.52.
After the initial implementation, suggested that it would be better to add a flag called versioningEnabled of type boolean more details can be found on the PR comment→ https://github.com/Alfresco/alfresco-community-repo/pull/149#pullrequestreview-529923717
I have updated the PR with the suggested changes, so now the PR contains the fix and tests, it is ready for review.
Thank you for your valuable input.
I have created a PR with the work so far implementing the fix Gavin suggested →