Idea Details

REST call to rename groups in PC

Last activity 06-13-2019 09:43 AM
Christophe_Sperandio's profile image
08-04-2017 01:04 PM

Hi,

 

It seems there's no way to rename a groups through the CA PC REST Webservices. Would you mind adding a method to do so?


Comments

08-08-2017 01:29 AM

Hi stoma11,

 

Could you possibly have a look at the discussion here: How can I rename Groups via Rest? Because it seems it's not working as intended and Jeffrey gave a potential reason for it...  (which is the reason why I opened the idea afterwards)

08-07-2017 02:49 PM

Hi Matthew,

 

Thanks for the confirmation. This is exactly the answer I gave a couple of posts above and it seems it didn't work for the author of the question... So it has to be tried again then, because my initial guess was also that the "reuse ids" flag should have done the trick!

08-07-2017 02:38 PM

Hi Christophe,

 

I ran this by the engineering team and it is possible to rename a group via REST.

 

To create a group, you can do the following:

Post the following to CAPC: http://PC_SYSTEM:8181/pc/center/webservice/groups/false/true

Where false/true is: /{useIds}/{allowDeletes} – setting useids to false triggers an add

<GroupTree path="/All Groups">

    <Group name="Geolocation Sites test" type="site" inherit="true" desc="Sites with geolocation attributes">

    </Group>  

</GroupTree>

 

Now, to update that name, we need to set useids = true and pass the group id in the XML

Post the following to CAPC: http://PC_SYSTEM:8181/pc/center/webservice/groups/true/true

<GroupTree path="/All Groups">

    <Group id="1572" name="Geolocation Sites test 2" type="site" inherit="true" desc="Sites with geolocation attributes">

    </Group>  

</GroupTree>

 

The combination of useids = true and passing a groupid causes an update to occur, instead of adding a second group named “Geolocation Sites test 2”

 

I'm following up to see if there's a natural spot in our wiki docs where we can document this.

 

Matt