要删除 CI 关系,请使用以下 URL 格式:
http://<servername>:<portnumber>/api/cmdb/cirelationships
假设您要在端口号为 8080 的本地服务器上添加变更,URL 应为:
http://localhost:8080/api/cmdb/cirelationshipss
关键字
Input 是一个 XML 字符串,作为 “POST attribute”发送,关键字为 “INPUT_DATA”。
操作名称 “delete ”应作为 “POST attribute”发送,关键字为 “OPERATION_NAME”。
技术员密钥应以 “POST attribute”的形式发送,密钥名为 “TECHNICIAN_KEY”。
注意: 如果未指定结果格式,API 将以 JSON 格式返回输出。
|
必填参数:
|
输入 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>
示例输出: 成功
<?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>
示例输出: 失败
<?xml version="1.0" encoding="UTF-8"?>
|