REST update node properties cm:taggable and cm:categories

cancel
Showing results for 
Search instead for 
Did you mean: 
lmattioli1
Partner

REST update node properties cm:taggable and cm:categories

In the API Explorer, when updating a node there's a note that settings properties of d:category is not supported (see image)

This means that Categories (cm:categories) and Tags (cm:taggable) of a node are not updatable via REST: is there a workaround to update them? In the future will be possible or when upgrading from Share to ADF this kind of properties will be lost forever?

 

01-04-2021 16-51-23.png

 

5 Replies
angelborroy
Alfresco Employee

Re: REST update node properties cm:taggable and cm:categories

You can use the Tags API for taggable:

https://api-explorer.alfresco.com/api-explorer/#/tags

Not sure about Category, but there should be some workaround to update this kind of properties. I guess using the right NodeRef via the Node API should be enough.

Hyland Developer Evangelist
lmattioli1
Partner

Re: REST update node properties cm:taggable and cm:categories

Ok for tags, thank you Angel.

 

Still looking for categories... will make some other experiment.

lmattioli1
Partner

Re: REST update node properties cm:taggable and cm:categories

With Categories no luck. 

The problem is in the Java implementation of the repo, here: probably there is a behaviour or something else that invalidate the property while is written. I get the simple error message "Failed to persist....")

This is bad: I am trying to migrate a customer from 5.2 to 6.2 but they use categories and so they can't use ADF.

I would have to create a custom endpoint (or looking if via CMIS there is something) just to update the cm:categories.

For completeness for any future reader: in ADF actually there is no component to view or update Tags, but at least there is an official REST endpoint, so you can make your own component and it will be probably usable during future migrations.

Making my own endpoint it's a pain that I will carry with me also in future migrations.

 

 

 

 

4535992
Senior Member

Re: REST update node properties cm:taggable and cm:categories

Found any solution for retrieve the categories with the rest api?

lmattioli1
Partner

Re: REST update node properties cm:taggable and cm:categories

We have done a search with the REST Api

Here you can see the payload

{
  "query": { "query": "PATH:\"cm:generalclassifiable//*\"" },
  "include": ["properties"],
  "paging": { "maxItems": 1000, "skipCount": 0 },
  "filterQueries": [{ "query": "TYPE:'cm:category'" }]
}
 
We also has made a public project during the Hack-a-thon
 
LM