Close Incident operation for the HP Service Manager adapter


The Close Incident operation closes an incident. To close an incident, it is first located by using the <incident-i-d> element in the <keys> element. Then, the incident is updated for field values that are provided by elements defined in the <instance> element. After this, the incident is closed.

The following table describes the elements of the <items> XML element and the adapter request. If the valid value for an element is not provided, the valid value must be assumed to be a string.

 Elements for the <items> XML element and adapter request for the Close Incident operation

The following figure displays a sample adapter request for the Close Incident operation.

Sample adapter request for the Close Incident operation


 <hp-service-manager-request>
   <entity>incident</entity>
   <entity-type />
   <request>
     <operation-name>close-incident</operation-name>
     <parameters>
       <close-incident-request>
         <model>
           <keys>
             <incident-i-d>
               <value>MyIncident0021</value>
               <type>String</type>
             </incident-i-d>
           </keys>
           <instance>
             <category>
               <value>incident</value>
               <type>String</type>
             </category>
             <open-time>
               <value>2008.11.01 08:00:00</value>
               <type>DateTime</type>
             </open-time>
             <opened-by>
               <value>opened by</value>
               <type>String</type>
             </opened-by>
             <severity>
               <value>1</value>
               <type>String</type>
             </severity>
             <updated-time>
               <value>2008.11.01 08:00:00</value>
               <type>DateTime</type>
             </updated-time>
             <primary-assignment-group>
               <value>Application</value>
               <type>String</type>
             </primary-assignment-group>
             <closed-time>
               <value>2008.11.01 08:00:00</value>
               <type>DateTime</type>
             </closed-time>
             <closed-by>
               <value>closed by</value>
               <type>String</type>
             </closed-by>
             <closure-code>
               <value>Out of Scope</value>
               <type>String</type>
             </closure-code>
               <incident-description>
               <type>Array</type>
               <incident-description>
                 <element>
                   <value>First Line of Description</value>
                   <type>String</type>
                 </element>
                 <element>
                   <value>Second Line of Description</value>
                   <type>String</type>
                 </element>
               </incident-description>
             </incident-description>
             <brief-description>
               <value>Test Incident Title</value>
               <type>String</type>
             </brief-description>
             <subcategory>
               <value>access</value>
               <type>String</type>
             </subcategory>
             <product-type>
               <value>login failure</value>
               <type>String</type>
             </product-type>
             <problem-type>
               <value>incident</value>
               <type>String</type>
             </problem-type>
             <user-priority>
               <value>3</value>
               <type>String</type>
             </user-priority>
             <initial-impact>
               <value>2</value>
               <type>String</type>
             </initial-impact>
             <contact>
               <value>TestContact</value>
               <type>String</type>
             </contact>
             <service>
               <value>Applications</value>
               <type>String</type>
             </service>
             <alert-status>
               <value>start</value>
               <type>String</type>
             </alert-status>
             <contact-last-name>
               <value>TestContact</value>
               <type>String</type>
             </contact-last-name>
             <contact-first-name>
               <value>Arora</value>
               <type>String</type>
             </contact-first-name>
             <i-m-ticket-status>
               <value>abc</value>
               <type>String</type>
             </i-m-ticket-status>
             <site-category>
               <value>test</value>
               <type>String</type>
             </site-category>
             <problem-type>
               <value>pro</value>
               <type>String</type>
             </problem-type>
             <s-l-a-agreement-i-d>
               <value>1234</value>
               <type>String</type>
             </s-l-a-agreement-i-d>
             <folder>
               <value>TestFolder</value>
               <type>String</type>
             </folder>
           </instance>
         </model>
       </close-incident-request>
     </parameters>
   </request>
 </hp-service-manager-request>

The following figure displays an adapter response for the Close Incident operation.

Sample adapter response for the Close Incident 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>
             <incident-i-d>
               <value>MyIncident0021</value>
               <type>String</type>
             </incident-i-d>
           </keys>
           <instance>
             <incident-i-d>
               <value>MyIncident0021</value>
               <type>String</type>
             </incident-i-d>
             <category>
               <value>incident</value>
               <type>String</type>
             </category>
             <open-time>
               <value>2008.11.01 08:00:00</value>
               <type>DateTime</type>
             </open-time>
             <opened-by>
               <value>opened by</value>
               <type>String</type>
             </opened-by>
             <severity>
               <value>1</value>
               <type>String</type>
             </severity>
             <updated-time>
               <value>2009.12.29 11:21:16</value>
               <type>DateTime</type>
             </updated-time>
             <primary-assignment-group>
               <value>Application</value>
               <type>String</type>
             </primary-assignment-group>
             <closed-time>
               <value>2008.11.01 08:00:00</value>
               <type>DateTime</type>
             </closed-time>
             <closed-by>
               <value>closed by</value>
               <type>String</type>
             </closed-by>
             <closure-code>
               <value>Out of Scope</value>
               <type>String</type>
             </closure-code>
             <incident-description>
               <type>Array</type>
               <incident-description>
                 <element>
                   <value>First Line of Description</value>
                   <type>String</type>
                 </element>
                 <element>
                   <value>Second Line of Description</value>
                   <type>String</type>
                 </element>
               </incident-description>
             </incident-description>
             <resolution>
               <type>Array</type>
               <resolution>
                 <element>
                   <value>reslolution line 1</value>
                   <type>String</type>
                 </element>
                 <element>
                   <value>resolution line 2</value>
                   <type>String</type>
                 </element>
               </resolution>
             </resolution>
             <contact>
               <value>TestContact</value>
               <type>String</type>
             </contact>
             <journal-updates>
               <type>Array</type>
               <journal-updates>
                 <element>
                   <value>12/27/09 22:41:54 US/Mountain (falcon):</value>
                   <type>String</type>
                 </element>
                  ...
                 <element>
                   <value>Test Update using Update Incident Wrapper</value>
                   <type>String</type>
                 </element>
               </journal-updates>
             </journal-updates>
             <alert-status>
               <value>start</value>
               <type>String</type>
             </alert-status>
             <contact-last-name>
               <value>TestContact</value>
               <type>String</type>
             </contact-last-name>
             <contact-first-name>
               <value>Arora</value>
               <type>String</type>
             </contact-first-name>
             <brief-description>
               <value>Test Incident Title</value>
               <type>String</type>
             </brief-description>
             <ticket-owner>
               <value>falcon</value>
               <type>String</type>
             </ticket-owner>
             <updated-by>
               <value>falcon</value>
               <type>String</type>
             </updated-by>
             <IMTicket-status>
               <value>Closed</value>
               <type>String</type>
             </IMTicket-status>
             <subcategory>
               <value>access</value>
               <type>String</type>
             </subcategory>
             <SLAAgreement-i-d>
               <value>1234</value>
               <type>Decimal</type>
             </SLAAgreement-i-d>
             <site-category>
               <value>test</value>
               <type>String</type>
             </site-category>
             <product-type>
               <value>login failure</value>
               <type>String</type>
             </product-type>
             <problem-type>
               <value>incident</value>
               <type>String</type>
             </problem-type>
             <user-priority>
               <value>3</value>
               <type>String</type>
             </user-priority>
             <initial-impact>
               <value>2</value>
               <type>String</type>
             </initial-impact>
             <folder>
               <value>TestFolder</value>
               <type>String</type>
             </folder>
             <service>
               <value>Applications</value>
               <type>String</type>
             </service>
             <uniquequery>number="MyIncident0021"</uniquequery>
             <recordid>MyIncident0021 - Test Incident Title</recordid>
             <i-m-ticket-status>
               <value>Closed</value>
               <type>String</type>
             </i-m-ticket-status>
             <s-l-a-agreement-i-d>
               <value>1234</value>
               <type>Decimal</type>
             </s-l-a-agreement-i-d>
           </instance>
         </model>
         <messages>
           <element>
             <value>US/Mountain 12/28/09 22:51:17:  Incident MyIncident0021 has been closed by falcon</value>
           </element>
         </messages>
         <status>SUCCESS</status>
         <message>Success</message>
         <schema-revision-date>2008.06.09 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*