Delete Location operation


The Delete Location operation deletes the details of a location.

Delete wrappers can delete only a single record. If information provided in the request refers to zero or more than one record, then no record is deleted. The entry to be deleted is first located by executing a logical AND operation using the elements provided in request. The located entry is then deleted.

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 Delete Location operation

The following figure displays the sample adapter request for the Delete Location operation.

Sample adapter request for the Delete Location operation


 <hp-service-manager-request>
   <entity>configurationitem</entity>
   <entity-type>location</entity-type>
   <request>
     <operation-name>delete-location</operation-name>
     <parameters>
       <delete-location-request>
         <model>
           <keys>
             <location>
               <value>MyLocation25</value>
               <type>String</type>
             </location>
           </keys>
           <instance>
             <location>
               <value>MyLocation25</value>
               <type>String</type>
             </location>
             <location-name>
               <value>Location Name-updated</value>
               <type>String</type>
             </location-name>
             <address>
               <type>Array</type>
               <address>
                 <element>
                   <value>Address</value>
                   <type>String</type>
                 </element>
               </address>
             </address>
             <city>
               <value>City</value>
               <type>String</type>
             </city>
             <state>
               <value>State</value>
               <type>String</type>
             </state>
             <zip>
               <value>zip</value>
               <type>String</type>
             </zip>
             <primary-contact>
               <value>primary contact</value>
               <type>String</type>
             </primary-contact>
             <phone>
               <value>Phone</value>
               <type>String</type>
             </phone>
             <location-open-time>
               <value>11:00:00</value>
               <type>Time</type>
             </location-open-time>
             <location-closing-time>
               <value>12:00:00</value>
               <type>Time</type>
             </location-closing-time>
             <primary-contact-department>
               <value>primary contact department</value>
               <type>String</type>
             </primary-contact-department>
             <location-code>
               <value>Location Code</value>
               <type>String</type>
             </location-code>
             <comments>
               <type>Array</type>
               <comments>
                 <element>
                   <value>Comment line 1</value>
                   <type>String</type>
                 </element>
                 <element>
                   <value>Comment line 2</value>
                   <type>String</type>
                 </element>
               </comments>
             </comments>
             <country>
               <value>Country</value>
               <type>String</type>
             </country>
             <email>
               <value>Email</value>
               <type>String</type>
             </email>
             <company>
               <value>Company</value>
               <type>String</type>
             </company>
             <site-category>
               <value>A</value>
               <type>String</type>
             </site-category>
           </instance>
         </model>
       </delete-location-request>
     </parameters>
   </request>
 </hp-service-manager-request>

The following figure displays an adapter response for the Delete Location operation.

Sample adapter response for the Delete Location 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>
             <location>
               <value>MyLocation25</value>
               <type>String</type>
             </location>
           </keys>
           <instance>
             <location-name>
               <value>Location Name-updated</value>
               <type>String</type>
             </location-name>
             <location>
               <value>MyLocation25</value>
               <type>String</type>
             </location>
             <address>
               <type>Array</type>
               <address>
                 <element>
                   <value>Address</value>
                   <type>String</type>
                 </element>
               </address>
             </address>
             <city>
               <value>City</value>
               <type>String</type>
             </city>
             <state>
               <value>State</value>
               <type>String</type>
             </state>
             <zip>
               <value>zip</value>
               <type>String</type>
             </zip>
             <primary-contact>
               <value>primary contact</value>
               <type>String</type>
             </primary-contact>
             <phone>
               <value>Phone</value>
               <type>String</type>
             </phone>
             <location-open-time>
               <value>11:00:00.000Z</value>
               <type>Time</type>
             </location-open-time>
             <location-closing-time>
               <value>12:00:00.000Z</value>
               <type>Time</type>
             </location-closing-time>
             <primary-contact-department>
               <value>primary contact department</value>
               <type>String</type>
             </primary-contact-department>
             <location-code>
               <value>Location Code</value>
               <type>String</type>
             </location-code>
             <comments>
               <type>Array</type>
               <comments>
                 <element>
                   <value>Comment line 1</value>
                   <type>String</type>
                 </element>
                 <element>
                   <value>Comment line 2</value>
                   <type>String</type>
                 </element>
               </comments>
             </comments>
             <country>
               <value>Country</value>
               <type>String</type>
             </country>
             <email>
               <value>Email</value>
               <type>String</type>
             </email>
             <company>
               <value>Company</value>
               <type>String</type>
             </company>
             <location-structure>
               <value>MyLocation25</value>
               <type>String</type>
             </location-structure>
             <location-full-name>
               <value>Company/MyLocation25</value>
               <type>String</type>
             </location-full-name>
             <site-category>
               <value>A</value>
               <type>String</type>
             </site-category>
             <uniquequery>location="MyLocation25"</uniquequery>
             <recordid>MyLocation25</recordid>
           </instance>
         </model>
         <messages>
           <element>
             <value>Location record deleted.</value>
           </element>
         </messages>
         <status>SUCCESS</status>
         <message>Success</message>
         <schema-revision-date>2007.04.04 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*

BMC Atrium Orchestrator Content 20.14.01