Get all configuration item (CI) details

To read (obtain) all CIs use the following URL format:

http://<hostname>:<port>/api/cmdb/ci/list/all/<Page Number>/

Assuming you want to read all CIs associated with the local server with port number 8080, the URL should be given as::

http://localhost:8080/api/cmdb/ci/list/all

Keypoints:

  1. The operation name "read"  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.

  • To fetch all CIs without CI Type details, use all

  • Parameter-related: To fetch CI for a specific CI Type, pass the CI Type value in the URL.

  • Parameter-related: Page Number - Optional. Specifies the page or results to retrieve

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

Sample XML Output

 

 

 

 

 

<API version="1.0">

    <response>



            <result>

                <statuscode>200</statuscode>

                <status>Success</status>

                <message>Successfully fetched.</message>

                <created-date>May 7, 2013 11:18 AM</created-date>

                <field-names>

                    <name type="String">CI Name</name>

                    <name type="String">CI Type</name>

                    <name type="String">Site</name>

                    <name type="String">Description</name>

                </field-names>

                <field-values totalRecords="8">

                    <record>

                        <value>Microsoft(R) Windows(R) Server 2003, Standard Edition (assetexplorer.helpdesk-test.com)</value>

                        <value>Operating System</value>

                        <value>(null)</value>

                        <value>(null)</value>

                    </record>

                    <record>

                        <value>balaguru.zohocorpin.com</value>

                        <value>Windows Workstation</value>

                        <value>(null)</value>

                        <value>(null)</value>

                    </record>

                    <!-- Truncated -->

                    <record>

                        <value>1 (hp2650.csez.zohocorpin.com)</value>

                        <value>Switch Ports</value>

                        <value>(null)</value>

                        <value>Created while scanning..</value>

                    </record>

                    <record>

                        <value>2 (hp2650.csez.zohocorpin.com)</value>

                        <value>Switch Ports</value>

                        <value>(null)</value>

                        <value>Created while scanning..</value>

                    </record>

                </field-values>

            </result>



    </response>

</API>

 

 

Sample JSON Output

 

 

 

{ "API" : { "response" : { "result" : { "created-date" : "Sep 2, 2013 12:08 PM",

              "field-names" : { "name" : [ { "content" : "CI Name",

                        "type" : "String"

                      },

                      { "content" : "CI Type",

                        "type" : "String"

                      },

                      { "content" : "Site",

                        "type" : "String"

                      },

                      { "content" : "Description",

                        "type" : "String"

                      }

                    ] },

              "field-values" : { "record" : [ { "value" : [ "administrator",

                            "Technician",

                            "(null)",

                            "3ED8AEC2-A7D1-42F6-9A90-8B848E70D077"

                          ] },

                      { "value" : [ "Administration",

                            "Department",

                            "Pleasanton,CA",

                            "(null)"

                          ] },

                      { "value" : [ "Engineering",

                            "Department",

                            "Pleasanton,CA",

                            "(null)"

                          ] },

                      { "value" : [ "Sales",

                            "Department",

                            "Pleasanton,CA",

                            "(null)"

                          ] },

                      { "value" : [ "Finance",

                            "Department",

                            "Pleasanton,CA",

                            "(null)"

                          ] },

                      { "value" : [ "IT Services",

                            "Department",

                            "Pleasanton,CA",

                            "(null)"

                          ] },

                      { "value" : [ "nprasanna-0157.csez.zohocorpin.com.",

                            "Windows Workstation",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "Microsoft Windows 7 Professional (nprasanna-0157.csez.zohocorpin.com.)",

                            "Operating System",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "dept1",

                            "Department",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "dept2",

                            "Department",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "dept3",

                            "Department",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "Research and Development",

                            "Department",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "Healthcare",

                            "Department",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "HR",

                            "Department",

                            "(null)",

                            "(null)"

                          ] },

                      { "value" : [ "Service",

                            "Department",

                            "(null)",

                            "(null)"

                          ] }

                    ],

                  "totalRecords" : "15"

                },

              "message" : "Successfully fetched.",

              "status" : "Success",

              "statuscode" : "200"

            } },

      "version" : "1.0"

    } }