cancel
Showing results for 
Search instead for 
Did you mean: 

Creating new Tags via CMIS / REST

franciscogonzal
Champ on-the-rise
Champ on-the-rise
Hello all,

I am trying to tag documents from my own Java Service (an external app) and I am having some problems.

First of all I tried to do this task via CMIS and I found a good solution at this post https://forums.alfresco.com/forum/developer-discussions/alfresco-api/trying-add-tag-document-0203201... . But the problem was that tags must be created in Alfresco before you try to add them to a Document (you need the own Tag ids for that).

Then I looked for the REST API services to add tags (http:/myalfresco/alfresco/service/index/family/Tagging) but looking at URLs it seems that I will also need tags id.

So the problem for me is: How do I create new Tags into Alfresco from an external app (based on Java)?

The first thing I had in mind was to try to create tags manually via CMIS. That way I tried to get Tags Root (workspace://SpacesStore/tag:tag-root) to create new tags inside. But it has been impossible for me to cast that object (cm:category) to any CMIS Java objects (CmisObject, Document or Folder). 

Via Rest I have not found any solution yet, so I am lost…

Is it possible to do this? Could any one help me?

I am using Alfresco Community 4.2 for testing.

Thanks in advance!
1 REPLY 1

franciscogonzal
Champ on-the-rise
Champ on-the-rise
Hi again,

Sorry, I did not see that REST has a function to create new tags. I will try it.

Thanks!