cancel
Showing results for 
Search instead for 
Did you mean: 

How to get tags associated with alfresco content in Drupal?

shambhavi
Champ in-the-making
Champ in-the-making
I have created a sync with alfresco content using following configuration:
$conf['cmis_repositories'] = array(
'default' => array(
'user' => 'admin',
'password' => 'admin@123',
'url' => 'http://localhost:8080/alfresco/service/cmis'
)
);

$conf['cmis_sync_map'] = array(
'page' => array(
'enabled' => TRUE,
'cmis_sync_cron_enabled' => TRUE,
'cmis_repositoryId' => 'default',
'cmis_folderPath' => '/Sites/demo/documentLibrary',
'subfolders' => TRUE,
'full_sync_next_cron' => TRUE,
'content_field' => 'body',
'fields' =>array('title'=> 'cmis:name')
),
);

I am not getting how can we get tag content associated with Alfresco in DRupal?
I tried to print the entire $cmis_object as well but do not get any tags related info..
Anybody has idea how to get it?
1 REPLY 1

sujaypillai
Confirmed Champ
Confirmed Champ
This is the service to be called for fetching the tags associated with a node -

http://localhost:8080/alfresco/service/api/node/{store_type}/{store_id}/{id}/tags

e.g. the nodeRef for which the tags are to be retrieved is workspace://SpacesStore/99cb2789-f67e-41ff-bea9-505c138a6b23
the service to be called in that case becomes - http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/99cb2789-f67e-41ff-bea9-505c13...

If I curl the same service it would return me a list of tags in json format as below -

curl -u admin:admin http://localhost:8080/alfresco/service/api/node/workspace/SpacesStore/99cb2789-f67e-41ff-bea9-505c13...
[
         "project"
]