<?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 Access versioning information through Java API in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/access-versioning-information-through-java-api/m-p/318544#M5545</link>
    <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;doc.setPropertyValue("file:content", batchUpload.getBatchBlob());
doc = repository.updateDocument(doc);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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 ?&lt;/P&gt;
&lt;P&gt;Thanks in advance for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Nov 2020 18:35:00 GMT</pubDate>
    <dc:creator>__2</dc:creator>
    <dc:date>2020-11-23T18:35:00Z</dc:date>
    <item>
      <title>Access versioning information through Java API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/access-versioning-information-through-java-api/m-p/318544#M5545</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;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&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;doc.setPropertyValue("file:content", batchUpload.getBatchBlob());
doc = repository.updateDocument(doc);
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;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 ?&lt;/P&gt;
&lt;P&gt;Thanks in advance for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Nov 2020 18:35:00 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/access-versioning-information-through-java-api/m-p/318544#M5545</guid>
      <dc:creator>__2</dc:creator>
      <dc:date>2020-11-23T18:35:00Z</dc:date>
    </item>
    <item>
      <title>Re: Access versioning information through Java API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/access-versioning-information-through-java-api/m-p/318545#M5546</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;You can:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Use the &lt;CODE&gt;Document.Version&lt;/CODE&gt; automation operation.&lt;/LI&gt;
&lt;LI&gt;Use the &lt;CODE&gt;X-Versioning-Option&lt;/CODE&gt; HTTP header with major or minor value to version a document with the PUT method on the Document ID&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Sun, 29 Nov 2020 15:14:05 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/access-versioning-information-through-java-api/m-p/318545#M5546</guid>
      <dc:creator>Gregory_Carlin</dc:creator>
      <dc:date>2020-11-29T15:14:05Z</dc:date>
    </item>
    <item>
      <title>Re: Access versioning information through Java API</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/access-versioning-information-through-java-api/m-p/318546#M5547</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;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 &lt;A href="https://doc.nuxeo.com/nxdoc/versioning/"&gt;automatic versioning&lt;/A&gt; is triggered.&lt;/P&gt;
&lt;P&gt;Once you have a version, you can use the operation &lt;CODE&gt;Document.GetVersions&lt;/CODE&gt; to get a list of versions for the given document, usage is such as below:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class="language-java"&gt;Documents versions = nuxeoClient.operation("Document.GetVersions").input("ID_OR_PATH").execute();
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Regards.&lt;/P&gt;</description>
      <pubDate>Mon, 30 Nov 2020 09:53:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/access-versioning-information-through-java-api/m-p/318546#M5547</guid>
      <dc:creator>Kevin_Leturc</dc:creator>
      <dc:date>2020-11-30T09:53:16Z</dc:date>
    </item>
  </channel>
</rss>

