Find Device operation


The Find Device operation retrieves 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.

 Elements for the <items> XML element and adapter request for the Find Device operation

The following figure displays the sample adapter request for the Find Device operation.

Sample adapter request for the Find Device operation


 <hp-service-manager-request>
   <entity>configurationitem</entity>
   <entity-type>device</entity-type>
   <request>
     <operation-name>retrieve-device</operation-name>
     <parameters>
       <retrieve-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</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>
              <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>
       </retrieve-device-request>
     </parameters>
   </request>
 </hp-service-manager-request>

The following figure displays an adapter response for the Find Device operation.

Sample adapter response for the Find 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</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>
         <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>

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

TrueSight Orchestration Content 21.02