I have the following question:
How can I remove Items from Groups via Rest?
Thanks a lot!
Good morning, @cust!Take a look at this tec doc and see your request!
How to delete multiple devices in CA Performance Management Data Aggregator via REST API
Use Web Services to Manage Groups - CA Performance Management - 3.1 - CA Technologies Documentation
The first link isn´t the answer to my question.
The seccond link I saw in the Doc, but it´s not the solution of my Problem.
I will remove a specified device or Interface from a Group. A single device/Interface or multiple devices/Interfaces. For example in my Group are devices with the deviceitemid 1, 2, 3, 4, 5, 6, 7, 8, 9. And the device 3,6,7 shoud remove. How can I do that via Rest?
You have to do what with a script. You get the ID of the devices you want to remove and run subsequent DELETE calls for each of the items you need to remove. Couldn't that fit the need?
Ok, but then I delete it completly? But I only want to remove it in a Group. There I can´t find a Rest Call in combination with Group<->Device/Interface.
You would follow the section in the 2nd doc link above:
Essentially you modify the group member rule and it does its own removal.
You can use the calls described here to manage your group members: Use Web Services to Manage Groups - CA Performance Management - 3.1 - CA Technologies Documentation
You have to change the rule and repost it. That will get rid of every group member and add only the ones you need. If you need some sort of static groups, you will have a rule naming each of your members anyway so that comes down to the same thing.
Hope it helps!
I tried the introduction of the Docu, but it doesn´t work.
<GroupTree path="/All Groups/MyGroup"> <Group name="My Device Group" desc="Here is the Device Group"> <Rules allowDeletes="true" saveRules="true"> <Rule add="device" name="Add Devices"> <Match> <Compare readOnly="true" using="MEMBER_OF"> <Property name="ItemID" type="device"/> <Value reference="/All Groups">1</Value> </Compare> <Compare readOnly="false" using="EQUALS"> <Property name="ItemID" type="device"/> <Value>137</Value> </Compare> <Compare readOnly="false" using="NOT_EQUALS"> <Property name="ItemID" type="device"/> <Value>5571</Value> </Compare> </Match> </Rule> </Rules> </Group></GroupTree>
I only get the Response 400 Bad Request. But when I write a new Description, it will changed the Description, but give me a 400 back.
Anyone a solution?
I have found a solution via the Method DELETE. The Doc is as always incomplete.