AssetExplorer

    Update Workstation CI



    To update a CI use the following URL format:

    http://<servername>:<portnumber>/api/cmdb/ci/


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

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


    Keypoints:

    1. Input is an XML string sent as "POST attribute" with key "INPUT_DATA".

    2. The operation name "update"  should be sent as a "POST attribute" with key "OPERATION_NAME".

    3. The technician key should be sent as a "POST attribute" with key "TECHNICIAN_KEY".


    Note:  

    • Technician having Asset update role can perform these operations.

    • CI-ID of the updated entry is returned along with the CI Name in the response.

    • CI Attributes, Global Attributes and custom CI Attributes for the corresponding CI Type can be updated

    • All workstation additional fields can be updated for workstation/server.

    • All asset additional attributes can be updated.

    • If the field is non-english, same can be given in the xml to update the data.

    • All asset additional attributes can be updated.

    • Can use the filters with relational operations for updating assets.

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

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


    Sample XML input for updating Server: (Can update workstation using the same set of fields).

     

    ?xml version="1.0" encoding="UTF-8"?>
    <API version="1.0" >
        <citype>
            <name>Windows Workstation</name>
            <criterias>
                <criteria>
                    <parameter>
                        <name compOperator="IS">CI Name</name>
                        <value>sdp-w2k3-13</value>
                    </parameter>
                </criteria>
            </criterias>
            <newvalue>
            <record>
            <!-- Product Name/Type cannot be updated using Update Operations-->
            <!--parameter><name>Product Name</name><value>Unknown Server</value></parameter-->
            <parameter><name>Site</name><value>China</value></parameter>        
            <parameter><name>Asset Tag</name><value>MY RES TAG_1</value></parameter>
            <parameter><name>Asset State</name><value>In use</value></parameter>
            <parameter><name>Asset Serial No.</name><value>KIJH-KPOJ-IOO9-IO98_1</value></parameter>
            <parameter><name>Cost</name><value>1223.98</value></parameter>
            <parameter><name>Vendor</name><value>HP</value></parameter>
            <parameter><name>Expiry Date</name><value>2012-08-23</value></parameter>
            <parameter><name>Warranty Expiry Date</name><value>2012-08-23</value></parameter>
            <parameter><name>Acquisition Date</name><value>2002-8-23</value></parameter>
            <parameter><name>Location</name><value>Beijing</value></parameter>
            <parameter><name>Business Impact</name><value>High</value></parameter>
            <parameter><name>Description</name><value>Beijing\r\nAXL_EXT</value></parameter>
            <parameter><name>Barcode</name><value>101001100010101_1</value></parameter>

            <!-- Inventory data -->
            <parameter><name>Service Tag</name><value>AXL90OSASASD_1</value></parameter>
            <parameter><name>Total Memory</name><value>2024</value></parameter>
            <parameter><name>Virtual Memory</name><value>2024</value></parameter>
            <parameter><name>OS</name><value>Microsoft Windows XP Professional 2010</value></parameter>
            <parameter><name>Service Pack</name><value>Microsoft Windows XP Professional 2010</value></parameter>
            <parameter><name>Disk space</name><value>22</value></parameter>
            <parameter><name>Manufacturer</name><value>HP</value></parameter>
            <parameter><name>Is Virtual</name><value>true</value></parameter>
            <parameter><name>Monitor Type</name><value>LG 360_EXT</value></parameter>
            <parameter><name>Monitor Manufacturer</name><value>LCD Flat monitor_EXT</value></parameter>
            <parameter><name>Monitor Serial Number</name><value>AADSD90KL88767_EDXT</value></parameter>
            <parameter><name>Mouse Type</name><value>LOGITECH_EXT</value></parameter>
            <parameter><name>Mouse Manufacturer</name><value>Microsoft Corporation</value></parameter>
            <parameter><name>Mouse Serial Number</name><value>MOUSE_AADSD90KL88767_EXT</value></parameter>
            <parameter><name>Keyboard Type</name><value>LG 480_EXT</value></parameter>
            <parameter><name>Keyboard Manufacturer</name><value>Microsoft Corporation</value></parameter>
            <parameter><name>Keyboard Serial Number</name><value>KBD_AADSD90KL88767_EXT</value></parameter>        

            <!-- Asset Additional fields -->
            <parameter><name>Asset Data</name><value>My data\r\nTextas_EXT</value></parameter>
            <parameter><name>Asset Date</name><value>2012-09-23</value></parameter>
            <parameter><name>Asset Number</name><value>987654321</value></parameter>

            <!-- Workstation Additional fields -->
            <parameter><name>WS Data</name><value>My data\r\nTextas_EXT</value></parameter>
            <parameter><name>WS Date</name><value>2013-09-23</value></parameter>
            <parameter><name>WS Number</name><value>987654321</value></parameter>

            <!-- Ownership details -->
            <multi-valued-parameter name="Assign Ownership">
                <record>
                    <parameter><name>Department</name><value>Finance</value></parameter>
                    <parameter><name>Department's site</name><value>Pleasanton,CA</value></parameter>
                </record>
            </multi-valued-parameter>

            <multi-valued-parameter name="Asset Lease Information">
                <record>
                    <parameter><name>Start Date</name><value>2013-09-21</value></parameter>
                    <parameter><name>End Date</name><value>2013-09-21</value></parameter>
                </record>
            </multi-valued-parameter>

            <multi-valued-parameter name="Network Details">
                <record>
                    <parameter><name>DHCP Server</name><value>www.dbexplorer.com_bak</value></parameter>
                    <parameter><name>IP Address</name><value>192.168.112.200</value></parameter>
                    <parameter><name>MAC Address</name><value>AS2.168.112.200</value></parameter>
                    <parameter><name>NIC</name><value>MY NIC_BAK</value></parameter>
                    <parameter><name>Network</name><value>192.168.112.255</value></parameter>
                </record>
                <record>
                    <parameter><name>DHCP Server</name><value>www.dbexplorer1.com_BAK</value></parameter>
                    <parameter><name>IP Address</name><value>192.168.112.255</value></parameter>
                    <parameter><name>MAC Address</name><value>AS2.168.112.255</value></parameter>
                    <parameter><name>NIC</name><value>MY NIC-1_BAK</value></parameter>
                    <parameter><name>Network</name><value>192.168.112.100</value></parameter>
                </record>
            </multi-valued-parameter>
            <multi-valued-parameter name="Processor Details">
                <record>
                    <parameter><name>Processor Count</name><value>2</value></parameter>
                    <parameter><name>Processor Type</name><value>Intel Inside 2</value></parameter>
                    <parameter><name>Processor Speed</name><value>2025</value></parameter>
                    <parameter><name>Processor Manufacturer</name><value>SSL Corporation_BAK</value></parameter>
                </record>
                <record>
                    <parameter><name>Processor Count</name><value>2</value></parameter>
                    <parameter><name>Processor Type</name><value>Intel Inside 2</value></parameter>
                    <parameter><name>Processor Speed</name><value>4025</value></parameter>
                    <parameter><name>Processor Manufacturer</name><value>SSL Corporation (India)_bak</value></parameter>
                </record>
            </multi-valued-parameter>
            </record>
            </newvalue>
        </citype>    
    </API>

     


     

    Copyright © 2017, ZOHO Corp. All Rights Reserved.