Update Device operation
The Update Device operation updates a device record.
The following table describes the elements of the <items>
XML element and the adapter request. If not specified, the valid value for an element should be assumed to be a string.
If no value is specified for a particular element or the element is skipped, the associated field will not be updated.
Elements for the <items> XML element and adapter request for the Update Device operation
Element |
Definition |
Required |
---|---|---|
|
Specifies the name of the operation: |
Yes |
|
Contains the other elements in the request |
Yes |
|
Contains elements that uniquely identify a record |
Yes |
|
Specifies a unique record |
Yes |
|
Specifies the name of the device |
Yes |
|
Specifies the type of the configuration item |
No |
|
Specifies the status of the configuration item
|
No |
|
Specifies the name of the vendor for the device |
No |
|
Specifies the parent device for the device |
No |
|
Specifies the model of the device |
No |
|
Specifies the serial number of the device |
No |
|
Specifies the location of the device |
No |
|
Specifies the name of the contact for the device |
No |
|
Specifies the part number of the device |
No |
|
Specifies the subtype for a configuration item |
No |
|
Specifies the location code of the device |
No |
|
Specifies the building for the device |
No |
|
Specifies the floor of the device |
No |
|
Specifies whether the system is down |
No |
|
Specifies the asset for the record |
No |
|
Specifies whether the device is a critical device |
No |
|
Specifies the name of the company that is associated with the device |
No |
|
Specifies the department for the device |
No |
|
Specifies the assignment group for the device |
No |
The following figure displays the sample adapter request for the Update Device operation.
Sample adapter request for the Update Device operation
<hp-service-manager-request>
<entity>configurationitem</entity>
<entity-type>device</entity-type>
<request>
<operation-name>update-device</operation-name>
<parameters>
<update-device-request>
<model>
<keys>
<configuration-item>
<value>NewDevice0001</value>
<type>String</type>
</configuration-item>
</keys>
<instance>
<configuration-item>
<value>NewDevice0001</value>
<type>String</type>
</configuration-item>
<configuration-item-type>
<value>device</value>
<type>String</type>
</configuration-item-type>
<status>
<value>status</value>
<type>String</type>
</status>
<vendor>
<value>Vendor name - UPDATED</value>
<type>String</type>
</vendor>
<parent-device>
<value>parent device</value>
<type>String</type>
</parent-device>
<model>
<value>model</value>
<type>String</type>
</model>
<serial-number>
<value>serial number</value>
<type>String</type>
</serial-number>
<location>
<value>location</value>
<type>String</type>
</location>
<contact-name>
<value>contact name</value>
<type>String</type>
</contact-name>
<part-number>
<part-number>
<value>part number</value>
<type>String</type>
</part-number>
<configuration-item-sub-type>
<value>cist</value>
<type>String</type>
</configuration-item-sub-type>
<location-code>
<value>location code</value>
<type>String</type>
</location-code>
<building>
<value>bulding</value>
<type>String</type>
</building>
<floor>
<value>floor</value>
<type>String</type>
</floor>
<room>
<value>room</value>
<type>String</type>
</room>
<system-down>
<value>true</value>
<type>Boolean</type>
</system-down>
<asset-tag>
<value>asset tag</value>
<type>String</type>
</asset-tag>
<critical>
<value>true</value>
<type>Boolean</type>
</critical>
<company>
<value>company</value>
<type>String</type>
</company>
<department>
<value>department</value>
<type>String</type>
</department>
<assignment-group>
<value>assignment</value>
<type>String</type>
</assignment-group>
</instance>
</model>
</update-device-request>
</parameters>
</request>
</hp-service-manager-request>
The following figure displays an adapter response for the Update Device operation.
Sample adapter response for the Update Device operation
<hp-service-manager-response>
<metadata>
<count>1</count>
</metadata>
<responses>
<response>
<metadata>
<count>1</count>
</metadata>
<item>
<metadata>
<status>success</status>
</metadata>
<parameters>
<model>
<keys>
<configuration-item>
<value>NewDevice0001</value>
<type>String</type>
</configuration-item>
</keys>
<instance>
<configuration-item>
<value>NewDevice0001</value>
<type>String</type>
</configuration-item>
<vendor>
<value>Vendor name - UPDATED</value>
<type>String</type>
</vendor>
<parent-device>
<value>parent device</value>
<type>String</type>
</parent-device>
<model>
<value>model</value>
<type>String</type>
</model>
<serial-number>
<value>serial number</value>
<type>String</type>
</serial-number>
<location>
<value>location</value>
<type>String</type>
</location>
<configuration-item-type>
<value>device</value>
<type>String</type>
</configuration-item-type>
<updated-by>
<value>falcon</value>
<type>String</type>
</updated-by>
<contact-name>
<value>contact name</value>
<type>String</type>
</contact-name>
<part-number>
<value>part number</value>
<type>String</type>
</part-number>
<status>
<value>status</value>
<type>String</type>
</status>
<configuration-item-sub-type>
<value>cist</value>
<type>String</type>
</configuration-item-sub-type>
<location-code>
<value>location code</value>
<type>String</type>
</location-code>
<building>
<value>bulding</value>
<type>String</type>
</building>
<floor>
<value>floor</value>
<type>String</type>
</floor>
<room>
<value>room</value>
<type>String</type>
</room>
<system-down>
<value>true</value>
<type>Boolean</type>
</system-down>
<asset-tag>
<value>asset tag</value>
<type>String</type>
</asset-tag>
<critical>
<value>true</value>
<type>Boolean</type>
</critical>
<company>
<value>company</value>
<type>String</type>
</company>
<department>
<value>department</value>
<type>String</type>
</department>
<assignment-group>
<value>assignment</value>
<type>String</type>
</assignment-group>
<uniquequery>logical.name="NewDevice0001"</uniquequery>
<recordid>NewDevice0001 - device - status</recordid>
</instance>
</model>
<messages>
<element>
<value>Category of device cannot be found in the devtype file. Record may not be viewable.</value>
</element>
<element>
<value>Configuration Item record updated.</value>
</element>
</messages>
<status>SUCCESS</status>
<message>Success</message>
<schema-revision-date>2010.01.20 00:00:00</schema-revision-date>
<schema-revision-level>0</schema-revision-level>
<return-code>0</return-code>
</parameters>
</item>
</response>
</responses>
</hp-service-manager-response>
Comments
Log in or register to comment.