Information

This site will undergo a brief period of maintenance on Thursday, 23 April at 2:30 AM Central/1:00 PM IST. During a 30 minute window, site availability may be intermittent.

Create Incident operation for the HP Service Manager adapter


The Create Incident operation creates an incident.

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

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

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

Sample adapter request for the Create Incident operation


 <hp-service-manager-request>
    <entity>incident</entity>
    <entity-type />
    <request>
      <operation-name>create-incident</operation-name>
      <parameters>
        <create-incident-request>
          <model>
            <keys>
              <incident-i-d>
                <value>My_123</value>
                <type>String</type>
              </incident-i-d>
            </keys>
            <instance>
              <incident-i-d>
                <value>My_456</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>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>
              <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>
        </create-incident-request>
      </parameters>
    </request>
  </hp-service-manager-request>

The following figure displays a sample adapter response for the Create Incident operation.

Sample adapter response for the Create 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_123</value>
                <type>String</type>
              </incident-i-d>
            </keys>
            <instance>
              <incident-i-d>
                <value>My_123</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.28 17:39:28</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>
              <contact>
                <value>TestContact</value>
                <type>String</type>
              </contact>
              <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>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>
              <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_123"</uniquequery>
              <recordid>My_123 - 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 12/28/09 05:09:28:  Incident My_123 has been opened 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*

BMC Atrium Orchestrator Content 20.14.01