Delete  configuration item (CI)

To delete a CI use the following URL format:

http://<servername>:<portnumber>/api/change/cmdb/ci/CI Type:CI Name/delete/

Assuming you deleting a requester CI in the local server with port number 8080, the URL should be given as:

http://localhost:8080/api/cmdb/ci/Requester:Mukul/delete/

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:  

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

  • It is mandatory to give colon between CI Type and CI Name, so as to delete the CI uniquely.

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

Sample XML Output:

<?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>

 

 

Sample JSON Output:

{

    "API": {

        "response": {

            "result": {

                "created-date": "Sep 2, 2013 03:10 PM",

                "message": "1 records removed successfully.",

                "status": "Success",

                "statuscode": "200"

            }

        },

        "version": "1.0"

    }