cancel
Showing results for 
Search instead for 
Did you mean: 

Json input PUT /alfresco/wcservice/api/groups/{shortName}?

relax
Champ in-the-making
Champ in-the-making
Hello,
I have a User Group named test, then I want to rename display name in hellotest.

I try with this json input
{
   "data":{
        "authorityType" : "GROUP",
        "shortName" : "test",
        "fullName" : "GROUP_test",
        "displayName" : "hellotest",
       
        "isRootGroup": true,
        "isAdminGroup": false,
        "groupCount": 0,
        "userCount": 0,        
       
        "url" : "/api/groups/test"
       
}

}
with url http://192.168.11.235:8080/alfresco/service/api/groups/test in PUT mode.

Is this correct json input?

The response of WizTools.org RESTClient 2.3 is HTTP/1.0 200 OK with this json output
{
   "data":{
        "authorityType" : "GROUP",
        "shortName" : "test",
        "fullName" : "GROUP_test",
        "displayName" : "test",
       
        "isRootGroup": true,
        "isAdminGroup": false,
        "groupCount": 0,
        "userCount": 0,        
       
        "url" : "/api/groups/test"
       
}

}
but the name of the group is still test in Groups Management.
2 REPLIES 2

mrogers
Star Contributor
Star Contributor
Looks o.k. except for the "data" element of your post data.

The put script only reads json.displayName so most of your content is ignored.

relax
Champ in-the-making
Champ in-the-making
Hello,
ok, with this input
{
        "displayName" : "hellotest"     
}
web script output is
{
   "data":{
        "authorityType" : "GROUP",
        "shortName" : "test",
        "fullName" : "GROUP_test",
        "displayName" : "hellotest",
       
        "isRootGroup": true,
        "isAdminGroup": false,
        "groupCount": 0,
        "userCount": 0,        
       
        "url" : "/api/groups/test"
       
}

}
with "displayName" : "hellotest" but the name of the group is still test in Groups Management.
It seems that this change is not updated in Alfresco Group Managemant.

Have I to force an update in someway?

My Alfresco is 3.2r2 community edition on Ubuntu 9.10 32 bit version.

This problem is present when I use web service too, see

http://forums.alfresco.com/en/viewtopic.php?f=27&t=24451