Accessing a version NodeRef via Alfresco REST Api

Showing results for 
Search instead for 
Did you mean: 

Accessing a version NodeRef via Alfresco REST Api

Hi All!

I am migrating Media Wiki from using Alfresco Web Services to use Alfresco REST so that ACS 5.2 (or higher) can be used.  The challenge I am facing is how the URLs where stored in Media Wiki for accessing versions within ACS.  When using Web Services the URLS are stored as


going forward (to simply changes) the url would be something like


In working through the REST services, there does not seem to be a way to pull back the NodeRef for a version.  Hopefully there might be a way of doing this, so I can dynamically map between the version noderef to the version label.  I am trying to avoid deploying any custom REST services to perform this action, if possible,



2 Replies

Re: Accessing a version NodeRef via Alfresco REST Api

I don't know where you've looked but the ReST API sure has operations to deal with versions and separate version IDs. Check Alfresco Content Services REST API Explorer  for operations on the version history. One thing to note is that via the ReST API you typically no longer deal with full NodeRefs but only with contextual IDs (which are typically the uid part of the full NodeRef).


Re: Accessing a version NodeRef via Alfresco REST Api

I have been reviewing the ReST interface via api-explorer and also the blogs provided by Gavin.  There is a Version API which provides the ability to look up version nodes using the workspace node reference and the version id (ie. version label).  There does not appear to be a way to use the version contextual ID which is fair enough.  However there does not appear to be a way to retrieve the version nodeRef via the ReST Version API as a property.

As the volume of content is not that much, I can write a simple script to rewrite the old nodeRefs used by MediaWiki and Alfresco WebServices php client to use the version label instead.