Delete CI Relationship



To delete a CI Relationship, use the following URL format:

http://<servername>:<portnumber>/api/cmdb/cirelationships

Assuming you are adding a change in the local server with port number 8080, the URL should be given as::

http://localhost:8080/api/cmdb/cirelationshipss


Keypoints:

  1. The operation name "delete"  should be sent as a "POST attribute" with key "OPERATION_NAME".

  2. The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY".


Note:  

  • Parameter Result Format - Optional. specifies the return format ( XML or JSON )

  • If no result format specified then API will return output in JSON format.



Mandatory Parameters:  

  • Deleting CI relationships for a CI

  • Use * to delete all relationships with a CI, but this can be used by specifying the relationship type.


Sample Input XML

<API version="1.0" locale="en">
    <relationships>
            <deleterelationship>
                <fromci>sd-test5.zohocorpin.com</fromci>
                <relationshiptype>runs</relationshiptype>
                <relatedcis>
                        <ci>SSL_Reports_sd-test5.zohocorpin.com</ci>
                        <!--Syntax to delete all ci <ci>*</ci> -->
                </relatedcis>
            </deleterelationship>
     </relationships>
</API>

 


Sample Output: Success

<?xml version="1.0" encoding="UTF-8"?>
<API locale="en" version="1.0">
            <result>
                <statuscode>200</statuscode>
                <status>Success</status>
                <message>1 records removed successfully.</message>
                <created-date>Mar 22, 2013 10:58 AM</created-date>
            </result>
</API>

 

Sample Output: Failure


<?xml version="1.0" encoding="UTF-8"?>
<API locale="1.0">
<response>
            <result>
                <statuscode>200</statuscode>
                <status>No rows matched to delete.</status>
                <message>No relationship is defined for the CI(s) [SSL_Reports_sd-test5.zohocorpin.com] </message>
            </result>
</response>
</API>

 


SeviceDeskPlus - 帮助台和资产管理软件
Copyright © 2006-2017 卓豪(北京)技术有限公司版权所有