List CMDB CI relationships for a specific parent CI and child Family through SOAP
search cancel

List CMDB CI relationships for a specific parent CI and child Family through SOAP

book

Article ID: 417245

calendar_today

Updated On:

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

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.

Environment

Release:  17.x
CA Service Desk Manager

Resolution

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]"

Additional Information

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.