Use the groups web service to get a list of subgroups and items that are direct members of a specified group. The XML that is returned displays information about the specified group as the parent element, and separates groups and items into their own separate elements.
The list that is returned does not include items that were added to the group as children of a managed item that was directly added to the group. For example, if a router is a direct member of a group, the list does not include the interfaces that belong to that router.
To get a list of members for a group whose name or ID you know, enter the following base URL:
http://CA Performance Center Server IP Address:8181/pc/center/webservice/groups /idName/idValue/items
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).
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.
Follow these steps:
http://CA Performance Center Server IP Address:8181/pc/center/webservice/groups/idName /idValue/items
The XML that is returned lists subgroups and managed items that are members of the group. It resembles the following:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<group id="787" name="Test Group" description="" type="group" subType="user">
<groups>
<group id="788" name="Test Child Group 1" description="" type="group" subType="user"/>
<group id="789" name="Test Child Group 2" description="" type="group" subType="user"/>
</groups>
<itemTypes>
<itemType type="Devices">
<items>
<item id="121" name="Austin Switch" description="Cisco IOS Software, Switch 192.168.1.1" type="device" subType="switches" addedBy="BY_USER"/>
<item id="124" name="Austin Router" description="Cisco IOS Software, Router 192.168.0.1" type="device" subType="router" addedBy="BY_USER"/>
<item id="127" name="Austin Server" description="Linux" type="device" subType="server" addedBy="BY_USER"/>
</items>
</itemType>
<itemType type="Interfaces">
<items>
<item id="417" name="eth0/1/0:7" description="Ethernet0/1/0:7" type="interface" subType="physical" addedBy="BY_USER"/>
<item id="418" name="eth0/1/0:8" description="Ethernet0/1/0:8" type="interface" subType="physical" addedBy="BY_USER"/>
<item id="420" name="eth0/1/0:9" description="Ethernet0/1/0:9" type="interface" subType="physical" addedBy="BY_USER"/>
</items>
</itemType>
</itemTypes>
</group>
|
Copyright © 2015 CA Technologies.
All rights reserved.
|
|