REST API to get content of a specific version of a file

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2016 07:28 AM
Hi,
Is there any REST API which returns the content of a specific version of a file? I am using /alfresco/service/api/node/content/workspace/SpacesStore/<id> API to get the content of the latest version, but didnt find any API which returns content for only a specific version which might not be latest.
For example if a file has 2 version 1.0 and 1.1, i want to get the content of 1.0 version file.
Thanks in advance.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2016 07:45 AM
You can check if https://community.alfresco.com/community/ecm/blog/2016/11/11/v1-rest-api-part-5-versioning-locking is what you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-12-2016 09:48 AM
Please note that this ReST API is currently only supported against an Alfresco 5.2 EA installation. A GA release of Alfresco 5.2 may occur this month.
If you want to access an older version of Alfresco you should check the URL index for internal ReST APIs via /alfresco/service/index for an appropriate operation.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2016 01:53 AM
Thanks Kayne for your reply.
Tried with the APIs mentioned in the post, but didnt work. Not sure if they are available for the version that i am using, i.e 5.0d community version.
Got the below output:
Output (removed stack trace):
{
"error": {
"errorKey": "Unable to locate resource resource for :nodes versions",
"statusCode": 400,
"briefSummary": "11130009 Unable to locate resource resource for :nodes versions",
"descriptionURL": "http://developer.alfresco.com/ErrorsExplained.html#Unable to locate resource resource for :nodes versions"
}
}
Am i doing something wrong?
I tried some service API URLs by appending version information to them, but it seems they always return the latest version irrespective of the version that is mentioned in the request
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-13-2016 02:38 AM
I'm sorry ,as Axel Faust said your version 5.0d might not support this restful api,.
Can you try to use apache chemistry opencmis library or customize your own webscript api.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2016 01:13 AM
Thanks Kayne.
Is there any CMIS API that i can use for this purpose? Trying to browse thru the documentation but didnt find anything yet.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-14-2016 03:04 AM
Please refer to Working with Versions - Apache Chemistry Samples
