Hello,
I am trying to find the APIs to establish the relationships between records. There is a way to do it through the Alfresco web interface (Creating relationships between records | Alfresco Documentation ) , but I am having trouble finding the correct way to do it through the APIs. I tried the apache opencmis (Apache Chemistry - OpenCMIS Client API Developer's Guide ) to set the relationships but it is not showing that the two documents establishing relationships in the Alfresco web interface.
Any help appreciated.
Thanks
I figured it out by looking into the chrome developer tools and searching for the POST API that is called when the relationship is created. For those who want to know I used the following API to do the job:
API links:
http://10.5.1.128:8080/alfresco/service/index/uri/
API to use:
POST: alfresco/service/api/node/workspace/SpacesStore/085f4637-bbXXXXXX-74f350920c25/customreferences
Payload:
{
"nodeRef":"workspace://SpacesStore/085f46XXXXX920c25",
"refId":"e5f1f6aXXXX746e55",
"toNode":"workspace://SpacesStore/49a167f7XXXXXa-c751b570db77",
"nodeRefUrl":"workspace/SpacesStore/085f4637-bbe1XXXX4f350920c25",
"successMessage":"Successfully added relationship"
}
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.