cancel
Showing results for 
Search instead for 
Did you mean: 

Error tagging via REST

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

I am getting an error when I try to execute via POST the REST function to create a new tag (/alfresco/service/api/tag/{store_type}/{store_id}). I am testing REST api with Postman app for Chrome and get this error:

Wrapped Exception (with status template): 030428081 Error durante el procesamiento de la plantilla 'Expression tag is undefined on line 3, column 15 in org/alfresco/repository/tagging/tag.post.json.ftl.'. Por favor, contacte con el administrador del sistema.",
    "callstack": [
        "",
        "freemarker.core.InvalidReferenceException: Expression tag is undefined on line 3, column 15 in org/alfresco/repository/tagging/tag.post.json.ftl.",
        "freemarker.core.TemplateObject.assertNonNull(TemplateObject.java:125)",
        "freemarker.core.TemplateObject.invalidTypeException(TemplateObject.java:135)",
        "freemarker.core.Dot._getAsTemplateModel(Dot.java:78)",


Does anyone know what could be the problem?

I am using Alfresco Community v4.2.0

Thanks in advance!

Regards
1 REPLY 1

sujaypillai
Confirmed Champ
Confirmed Champ
You should have your data in this form when posting : ["t222a","t222b","t222c"]

Please refer the screenshot attached here : https://docs.google.com/file/d/0Bz3ZqdPjj9KXUkJrUHdaT0JrRWs/edit?usp=sharing

With CURL you can use this one:
curl -H "Accept: application/json" -H "Content-type: application/json" -X POST -d '["tees","shirts"]' –user admin:admin123 http://192.168.227.1:8080/alfresco/service/api/node/workspace/SpacesStore/e4dc6bb9-d8a2-4184-8967-c8...