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.
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.
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.
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
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.
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.
12-14-2016 03:04 AM
Please refer to Working with Versions - Apache Chemistry Samples
Tags
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.