REST Method to delete individual devices statically added to Group in NetOps Portal
search cancel

REST Method to delete individual devices statically added to Group in NetOps Portal

book

Article ID: 115472

calendar_today

Updated On:

Products

CA Performance Management

Issue/Introduction

You can use REST to manipulate many functions in DX NetOps Portal. 

  • You need to programmatically manage a group in DX NetOps Portal. 
  • You need to delete devices from a group that were programmatically added to the group via REST and not with a rule.

There doesn't appear to be a way to remove a device in a group by it's DeviceID. How can you list all members of a group in the DX NetOps Portal?

Environment

Currently supported versions

Resolution

Yes, there is a method to use REST to add or delete items from a group.  
Items being devices/interfaces/etc, NOT subgroups or references to other groups.

Basically a POST or DELETE to

http://<NetOps Portal>:8181/pc/center/webservice/groups/groupItemId/ITEMID/items(replace ITEMID with the itemid if the device you wish to delete)

...

To see all groups do a GET

http://<NetOps Portal>:8181/pc/center/webservice/groups/groupPath/All%20Groups

+++

curl -kv -u admin -X GET -H 'Content-type: application/xml' http://<NetOps Portal>:8181/pc/center/webservice/groups/groupPath/All%20Groups

+++

From the results you get:

<Group desc="" id="6362" inherit="true" name="example" type="user group"/>

Now to see a single group using the id= from the above GET

http://<NetOps Portal>:8181/pc/center/webservice/groups/groupItemId/6362/

+++

curl -kv -u admin -X GET -H 'Content-type: application/xml' http://<NetOps Portal>:8181/pc/center/webservice/groups/groupItemId/6362/

+++

To see the members of this group GET

http://<NetOps Portal>:8181/pc/center/webservice/groups/groupItemId/6362/items

+++

curl -kv -u admin -X GET -H 'Content-type: application/xml' http://<NetOps Portal>:8181/pc/center/webservice/groups/groupItemId/6362/items

+++

Additional Information

  • http://<NetOps Portal>:8181/pc/center/rest/groups/documentation (replace NetOps Portal with your PC hostname)
  • https://<NetOps Portal>:8182/pc/center/rest/groups/documentation