Previous Topic: Create Groups within a Custom TenantNext Topic: Add Group Rules


Add Items to Groups

Add individual managed items to groups using the groups web service. The item ID for each item is required.

Start by using the devices web service to get a list of managed items in the database and their IDs. The get id names method returns a list of identifiers that can be used in other methods to identify devices. A submethod, get interfaces, returns a list of device interfaces. You can filter the results by item subtype.

Checking is performed to avoid item duplication and make sure the group is valid. If any of these steps fail, then the service will exit out with an error:

Each item that is specified in the list is also validated according to the following criteria:

The XML that is returned shows the results of the validation. They include a report of the items that were added and the items that were not added.

Follow these steps:

  1. Set up a REST client with a connection to the CA Performance Center server.
  2. Use the following format for the URL in the REST client:
    http://CA Performance Center Server IP Address:8181/pc/center/webservice/devices/idNames
    
  3. In the XML that is returned, locate the device IDs for the devices to add to the target group.
  4. Now type the following URL into the REST client:
    http://CA Performance Center Server IP Address:8181/pc/center/webservice/groups
    /idName/idValue/items
    
    idName

    A supported ID name for specifying a group. Possible values can be retrieved by performing a GET operation on the following URL:
    http://CA Performance Center Server IP Address:8181/pc/center/webservice/groups/idNames. Use one of the following parameters for the idName:

    groupItemId - The internally assigned ID of the group.

    groupPath - The path of the group, with each group delimited by encoded front slashes (%F2).

    idValue

    The value that is used to specify a group, based on the nature of the ID name. Dependent on the value of the idName field, as follows:

    groupItemId - The ID of the group is expected.

    groupPath - The path of the group, with each group delimited by encoded front slashes (%20) is expected.

  5. Select POST for the HTTP method.
  6. Provide a valid Username and Password in the request header for a user account that has global administrator access to CA Performance Center.
  7. Select 'application/xml' as the 'Body Content-type'.
  8. Add the following XML within the "Body" text section:
    	<items>
    
    	  <item id=”value”/>
    
    	</items>
    
  9. For example, enter something like the following to add a single router with managed item ID 684 to the group named "Austin":
    	<items>
    
    	  <item id=”684”/>
    
    	</items>
    

    You can also submit a list of managed items to add to a single group.

  10. For example, add XML like the following to add five items:
    <items>
    
      <item id=”123”/>
    
      <item id=”234”/>
    
      <item id=”345”/>
    
      <item id=”456”/>
    
      <item id=”567”/>
    
    </items>
    
  11. The items that you specified in your list are added to the group.
  12. Use the product user interface to verify group membership.