AnsweredAssumed Answered

Shall we access the comments of a node from CMIS object Id?

Question asked by sepgs2004 on Aug 7, 2018
Latest reply on Aug 7, 2018 by sepgs2004

In my application, we connect/access Alfresco repository using CMIS api.

There is a recent requirement - I have to access and manage the comments on a node (document).

I chose to use Rest API to access the comments through (existing) web scripts. 


I see the following in the web scripts...

GET /alfresco/s/api/comment/node/{store_type}/{store_id}/{id}


Let us say I am accessing a document with object id faa9214a-7d03-4ffd-9fd4-97e6ce8748f3

When I get the objectId from the CMIS object, I get it this way. Please note the version number appended in the end.



I access the comments of a node through 



Please note that I have to give the object id without the version number to this url call.


I do not have experience in getting the id without the version number.

I also do not know if there is any difference between object id, node id, version id, version series id?



Can I strip the version number in code, from the cmis.objectid and use it to access the comments using the webscript?

I would like to confirm this. 

Or should I get or find the node id in a different better way.


When I access the node in CMIS workbench, I see the following properties that are related to the id.

Can I use any of these property values?


I see the following properties with their values


cmis:versionSeriesId=Property [id=cmis:versionSeriesId, display Name=Version series id, local name=versionSeriesId, query name=doc.cmis:versionSeriesId, values=[faa9214a-7d03-4ffd-9fd4-97e6ce8748f3]][extensions=null]


cmis:objectId=Property [id=cmis:objectId, display Name=Object Id, local name=objectId, query name=samlo.cmis:objectId, values=[faa9214a-7d03-4ffd-9fd4-97e6ce8748f3;1.2]][extensions=null]


alfcmis:nodeRef=Property [id=alfcmis:nodeRef, display Name=Alfresco Node Ref, local name=nodeRef, query name=samlo.alfcmis:nodeRef, values=[workspace://SpacesStore/faa9214a-7d03-4ffd-9fd4-97e6ce8748f3]][extensions=null]