Get All CI(s) Count
To read (obtain) the number of CIs available in your organization use the following URL format:
http://<hostname>:<port>/api/cmdb/ci/count/all/
Assuming you want to read the number of CIs associated with the local server with port number 8080, the URL should be given as:
http://localhost:8080/api/cmdb/ci/count/all
Keypoints:
-
The operation name "read" 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. |
Sample XML Output for Get All CI(s) Count:
<?xml version="1.0" encoding="UTF-8"?>
<API version="1.0"><response>
<result>
<statuscode>200</statuscode>
<status>Sucess</status>
<message>Successfully fetched.</message>
<created-date>Mar 13, 2013 05:10 PM</created-date>
<field-names>
<name type="Integer">Count</name>
; </field-names>
<field-values totalRecords="1">
<record>
<value>30</value>
</record>
</field-values>
</result>
</response>
Sample JSON Output for Get All CI(s) Count:
{
"API": {
"response": {
"result": {
"created-date": "Sep 2, 2013 12:11 PM",
"field-names": {
"name": {
"content": "Count",
"type": "Integer"
}
},
"field-values": {
"record": {
"value": "1"
},
"totalRecords": "1"
},
"message": "Successfully fetched.",
"status": "Success",
"statuscode": "200"
}
},
"version": "1.0"
}
}