Update Incident operation
The Update Incident operation updates an incident.
To update an incident, the incident is first located by using the <incident-i-d> element that is provided in the <keys> element. The incident is then updated for field values that are provided by elements defined in the <instance> element.
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. 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 Incident operation
The following figure displays a sample adapter request for the Update Incident operation.
Sample adapter request for the Update Incident operation
<hp-service-manager-request>
<entity>incident</entity>
<entity-type />
<request>
<operation-name>update-incident</operation-name>
<parameters>
<update-incident-request>
<model>
<keys>
<incident-i-d>
<value>My_55</value>
<type>String</type>
</incident-i-d>
</keys>
<instance>
<resolution-fix-type>
<value>permanent</value>
<type>String</type>
</resolution-fix-type>
<category>
<value>incident</value>
<type>String</type>
</category>
<severity>
<value>1</value>
<type>String</type>
</severity>
<primary-assignment-group>
<value>Application</value>
<type>String</type>
</primary-assignment-group>
<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>
<journal-updates>
<type>Array</type>
<journal-updates>
<element>
<value>Test Update using Update Incident Wrapper</value>
<type>String</type>
</element>
</journal-updates>
</journal-updates>
</instance>
</model>
</update-incident-request>
</parameters>
</request>
</hp-service-manager-request>
The following figure displays an adapter response for the Update Incident operation.
Sample adapter response for the Update 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>My_55</value>
<type>String</type>
</incident-i-d>
</keys>
<instance>
<incident-i-d>
<value>My_55</value>
<type>String</type>
</incident-i-d>
<category>
<value>incident</value>
<type>String</type>
</category>
<open-time>
<value>2009.12.31 16:54:17</value>
<type>DateTime</type>
</open-time>
<opened-by>
<value>falcon</value>
<type>String</type>
</opened-by>
<severity>
<value>1</value>
<type>String</type>
</severity>
<updated-time>
<value>2010.01.04 16:14:24</value>
<type>DateTime</type>
</updated-time>
<primary-assignment-group>
<value>Application</value>
<type>String</type>
</primary-assignment-group>
<closure-code>
<value>Solved by User Instruction</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>x</value>
<type>String</type>
</element>
</resolution>
</resolution>
<contact>
<value>TestContact</value>
<type>String</type>
</contact>
<journal-updates>
<type>Array</type>
<journal-updates>
<element>
<value>01/04/10 03:44:24 US/Mountain (falcon):</value>
<type>String</type>
</element>
<element>
<value>Test Update using Update Incident Wrapper</value>
<type>String</type>
</element>
<element>
<value>12/31/09 05:27:17 US/Mountain (falcon):</value>
<type>String</type>
</element>
<element>
<value>354</value>
<type>String</type>
</element>
<element>
<value>12/31/09 04:39:36 US/Mountain (falcon):</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>
<company>
<value>DEFAULT</value>
<type>String</type>
</company>
<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>abc</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>
<resolution-fix-type>
<value>permanent</value>
<type>String</type>
</resolution-fix-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="My_55"</uniquequery>
<recordid>My_55 - Test Incident Title</recordid>
<i-m-ticket-status>
<value>abc</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 01/04/10 03:44:24: Incident My_55 has been updated 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>