<?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 Automation Client - retrieve document versions in Nuxeo Forum</title>
    <link>https://connect.hyland.com/t5/nuxeo-forum/automation-client-retrieve-document-versions/m-p/318613#M5614</link>
    <description>&lt;P&gt;Hi@all &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm creating/updating documents remotely on a Nuxeo repository using Automation Client (I'm using Nuxeo 5.6). How can i find the versions of a document using Automation Client? And how can i retrieve the content of a specific version of a document?&lt;/P&gt;</description>
    <pubDate>Tue, 16 Apr 2013 17:55:10 GMT</pubDate>
    <dc:creator>debbbole_</dc:creator>
    <dc:date>2013-04-16T17:55:10Z</dc:date>
    <item>
      <title>Automation Client - retrieve document versions</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/automation-client-retrieve-document-versions/m-p/318613#M5614</link>
      <description>&lt;P&gt;Hi@all &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I'm creating/updating documents remotely on a Nuxeo repository using Automation Client (I'm using Nuxeo 5.6). How can i find the versions of a document using Automation Client? And how can i retrieve the content of a specific version of a document?&lt;/P&gt;</description>
      <pubDate>Tue, 16 Apr 2013 17:55:10 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/automation-client-retrieve-document-versions/m-p/318613#M5614</guid>
      <dc:creator>debbbole_</dc:creator>
      <dc:date>2013-04-16T17:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Automation Client - retrieve document versions</title>
      <link>https://connect.hyland.com/t5/nuxeo-forum/automation-client-retrieve-document-versions/m-p/318614#M5615</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;
&lt;P&gt;There is no automation operation that get versions of one document (maybe it should).
Anyway, you can get away with a &lt;A href="http://explorer.nuxeo.org/nuxeo/site/distribution/Nuxeo%20Platform-5.6/viewOperation/Context.RunScript"&gt;run script operation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Here is an example of script that get all published versions of a document (proxies) and remove them :&lt;/P&gt;
&lt;PRE&gt;&lt;CODE&gt;proxies = Session.getProxies(new org.nuxeo.ecm.core.api.IdRef(Document.id),null);
for(proxy : proxies)
{ Session.removeDocument(proxy.getRef()); }
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In your case, you are not looking for proxies but versions, so it should be something like :
version = Session.GetVersions(....&lt;/P&gt;
&lt;P&gt;For more informations of what methods are available with the object Session, you can take a look at:
&lt;A href="http://community.nuxeo.com/api/nuxeo/5.6/javadoc/org/nuxeo/ecm/core/api/CoreSession.html"&gt;CoreSession&lt;/A&gt;
You will see that they are several methods to get the versions of a document depending on what you plan to do with it (just need the refs or all document models).&lt;/P&gt;
&lt;P&gt;Fred&lt;/P&gt;</description>
      <pubDate>Mon, 29 Apr 2013 08:27:55 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/nuxeo-forum/automation-client-retrieve-document-versions/m-p/318614#M5615</guid>
      <dc:creator>Fred_Vadon</dc:creator>
      <dc:date>2013-04-29T08:27:55Z</dc:date>
    </item>
  </channel>
</rss>

