要删除 CI,请使用以下 URL 格式:
http://<servername>:<portnumber>/api/change/cmdb/ci/CI Type:CI Name/delete/
假设您删除的是本地服务器中端口号为 8080 的请求者 CI,URL 应为
http://localhost:8080/api/cmdb/ci/Requester:Mukul/delete/
关键字
操作名称 “delete ”应作为 “POST attribute”发送,关键字为 “OPERATION_NAME”。
技术员密钥应以 “POST attribute”的形式发送,密钥名为 “TECHNICIAN_KEY”。
注意: 如果未指定结果格式,API 将以 JSON 格式返回输出。
|
XML 输出示例:
<?xml version="1.0" encoding="UTF-8"?>
<API version="1.0">
<response>
<result>
<statuscode>200</statuscode>
<status>Success</status>
<message>1 records removed successfully.</message>
<created-date>Mar 22, 2013 10:58 AM</created-date>
</result>
</response>
</API>
JSON 输出示例:
{
"API": {
"response": {
"result": {
"created-date": "Sep 2, 2013 03:10 PM",
"message": "1 records removed successfully.",
"status": "Success",
"statuscode": "200"
}
},
"version": "1.0"
}
}