I have the following question: How can I rename a Group Name via Rest?
Thanks a lot!
I invite you to try again your tests on renaming as after I opened the idea on the link given above, I then got confirmed it should work with the instruction in the post (use true for reuse ids). Name should be changed. If that's not the case and you have it "documented" could you please add a comment on the idea so that stoma11 can follow that up?
I'm fairly certain there is a PUT method for groups. Is this a tenant group? Which user are you using? Which version of CA PC? Did you retrieve the XML from the GET call? Can you share it there?
(sorry I don't have any system here to try it but I'm sure i did that already)
Ok so the first query should work but should be using "groupPath/All%20Groups%2FGroups%2FMyGroup".
However what you did should be ok too with the ID you retrieved and is actually safer I guess. Actually I think you are right you must use POST and not PUT in that case. But that should be sent to
The last "false" depends wether you want to allow deletion of items or not.
The first "true" is to say you want to reuse the same ID which should lead to changing settings and keeping the rest intact with the same ID.
Then maybe I am remembering wrong and what I did was creating a new group with the new name and then deleting the old one. Would that work for you?
1. You do the GET to get the whole definition of your group.
2. You create the new group with the POST and the new name in the XML BODY, using this time "false/false" at the end.
3. You delete the group ID of the original group.
You should end up with the wanted result but it might require some rework on dashboards in case you used the original group as a fixed group.
Maybe GiMMaY would be able to confirm there is no other call to rename a group?
You can get the group information from PC using the GET call and then edit the name in the XML output you get to PUT it on the same group ID.You should find what you need here: https://docops.ca.com/ca-performance-management/3-1/en/administrating/performance-center-rest-webservices/use-web-services-to-manage-groups
Hi thanks for your answer.
I used CA PM 3.1.
First I send a GET request with: ../pc/center/webservice/groups/groupPath/MyGroup/items
The Group is in /All Groups/Groups/MyGroup Only the relativ Path is accepted, when I use the absolut Path with the Delimiter &2F, then I get the message invalid Path.
The result in Payload is: <group id="10976" name="MyGroup" description="" type="group" subType="user"/>
When I send a GET request to ../pc/center/webservicegroups/groupItemId/10976 I get tho following: <GroupTree id="10976" inheritDefault="true" path="/All Groups/Groups/MyGroup"/>
I tried with /external-link.jspa?url=http%3A%2F%2FPC_host%3A8181%2Fpc%2Fcenter%2Fwebservice%2Fgroups%2Ftrue%2Ftruehttp://PC_host:8181/pc/center/webservice/groups/true/false
and the Body:
<GroupTree id="10976" name="RenameName" inheritDefault="true" path="/All Groups/Groups"/>
I get 200 OK. But the Name of the Group is still the same MyGroup.
<GroupTree id="3690" inheritDefault="true" path="/All Groups/Groups">
Thanks a lot for your effort.
For a automation process via Script e.g. Shell or others I think ist to ornate. But I will keep it in the back =)
I tried, but the PUT Method is not allowed. And when I use POST I get 400 bad Request The following Group Path is invalid: Not specified.
Thanks a lot for the useful hint.
This is the request, when I send a PUT:
Actually I just got the confirmation there's no webservice call in PC to rename a group. So what I proposed is the only alternative. I created an idea so we can push the idea to product development: https://communities.ca.com/ideas/235736409-rest-call-to-rename-groups-in-pcPlease vote for it! ;)