The following SOAP call demonstrates how to acquire a list of relationships based off a given parent CI and a given child CI class family.
Release: 17.x
CA Service Desk Manager
The web services call of interest is made to the bmhier object, the Business Management Object:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://www.ca.com/UnicenterServicePlus/ServiceDesk">
<soapenv:Header/>
<soapenv:Body>
<ser:doSelect>
<sid>123456789</sid>
<objectType>bmhier</objectType>
<whereClause>parent = U'[UUID VALUE]' and child.family = [ID VALUE]</whereClause>
<maxRows>-1</maxRows>
<attributes>
<!--Zero or more repetitions:-->
<string>parent</string>
<string>ci_rel_type</string>
<string>child</string>
<string>child.family</string>
</attributes>
</ser:doSelect>
</soapenv:Body>
</soapenv:Envelope>
The return result will list the parent CI, the relationship type, the child CI, and the child CI Class Family
Of interest are the values in the where clause:
parent = U'[UUID VALUE]'
This parameter is accepting an ID value of a given CI entry construed to be the parent CI of the relationship. To list all CI's and their ID values, please run
pdm_extract -f "Select id, resource_name from ca_owned_resource"
For the specific id value described above:
pdm_extract -f "Select id, resource_name from ca_owned_resource where id = U'[UUID VALUE]'"
child.family = [ID VALUE]
This parameter is accepting the Class Family for the child CI in question. To list all Class Family entries and their ID values, please run
pdm_extract -f "Select id, name from ca_resource_family"
For the specific id value described above:
pdm_extract -f "Select id, name from ca_resource_family where id = [ID VALUE]"
For information on using SOAPUI to interact with SDM's SOAP Web Services, please review SOAP Web Services Demo using SOAPUI
Please see Creating a CMDB CI Relationship via SOAP Call for the corresponding method to establish a new relationship
All of the above pdm_extract commands should be executed from an Admin Command Prompt on the given SDM Server.
Broadcom Support is not permitted to assist you to develop your custom code. Converting the above code for use in another platform is outside the scope of Support as well.