Delete CI using criteria
To delete CI using a filter use the following URL format:
http://<servername>:<portnumber>/api/cmdb/ci
Assuming you are deleting a CI in the local server with port number 8080, the URL should be given as::
http://localhost:8080/api/cmdb/ci
Keypoints:
-
Input is an XML string sent as "POST attribute" with key "INPUT_DATA".
-
The operation name "delete" should be sent as a "POST attribute" with key "OPERATION_NAME".
-
The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY".
|
Note:
If no result format specified then API will return output in JSON format. |
|
Mandatory Parameters:
|
Sample Input XML
<?xml version="1.0" encoding="UTF-8"?>
<API version="1.0">
<citype>
<name>Switch Ports</name>
<criterias>
<criteria>
<parameter><name compOperator="CONTAINS">CI Name</name><value>1 (hp2650.csez.zohocorpin.com)</value></parameter>
</criteria>
</criterias>
</citype>
</API>
Sample XML to delete a workstation CI using CI Type
<?xml version="1.0" encoding="UTF-8"?>
<API locale="en" version="1.0">
<response>
<result>
<statuscode>200</statuscode>
<status>Success</status>
<message>Relationship added successfully.</message>
<created-date>Mon Jul 05 18:18:39 GMT+05:30 2010</created-date>
</result>
</response>
</API>
Sample Response: Success
<?xml version="1.0" encoding="UTF-8"?> <result>
<API version="1.0">
|
Sample Response: Failure
<?xml version="1.0" encoding="UTF-8"?> |
JSON Response for deleting Printer CIs
{
|