11-23-2020 01:35 PM
Hi!
I'm coding an application that stores documents in Nuxeo using Java API. I figured out how to create additional versions of a document through
doc.setPropertyValue("file:content", batchUpload.getBatchBlob());
doc = repository.updateDocument(doc);
and I can see using Web UI that it worked. Now, how can I access through the API the information in the screenshot below, like number of versions, timestamp, author,... And retrieve a particular version ?
Thanks in advance for your help 🙂
11-29-2020 10:14 AM
Hello,
You can:
Document.Version
automation operation.X-Versioning-Option
HTTP header with major or minor value to version a document with the PUT method on the Document IDRegards
11-30-2020 04:53 AM
Hello,
You can indeed use the automation operation or the header that Greg proposed to manually version a document. In your case, it seems that the automatic versioning is triggered.
Once you have a version, you can use the operation Document.GetVersions
to get a list of versions for the given document, usage is such as below:
Documents versions = nuxeoClient.operation("Document.GetVersions").input("ID_OR_PATH").execute();
Regards.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.