Event submit examples

You can submit new events using the URL https://<server.example.com>/opr-web/rest/9.10/event_list. The HTTP method in this case is the POST method and the expected payload is an OprEvent or OprEventList. For an OprEventList object, the media type must be text/xml;type=collection or application/xml;type=collection.

If the submitter does not add an OprForwardingInfo entry for itself in the event, one will be automatically added with ForwardingType set to notify. This allows the caller to subsequently read the event from the Event Synchronization Web Service.

The following samples show the XML payload. The correct HTTP method to set is the POST method.

Submit a New Event

Here is a sample payload showing submittal of a single event:

<event xmlns="http://www.hp.com/2009/software/opr/data_model">
   <title>This is a new event</title>
   <description>This is a description</description>
</event>

Submit a New Event with Synchronization Requested

Here is a sample payload showing an event submittal with synchronization requested:

<event xmlns="http://www.hp.com/2009/software/opr/data_model">
   <title>This is a new event</title>
   <description>This is a description</description>
   <forwarding_info_list>
      <forwarding_info>
         <dns_name>extclt.example.com</dns_name>
         <external_id>IM10219</external_id>
         <external_url>http://extclt.example.com:8081/webtier-9.20/index.do?ctx=docEngine&file=probsummary&query=number%3D%22IM10219%22</external_url>
         <forwarding_type>synchronize</forwarding_type>
         <state>originated</state>
      </forwarding_info>
   </forwarding_info_list>
</event>

Submit a New Event with Synchronization and Transfer Control Requested

Here is a sample payload showing an event submittal with synchronization and transfer control requested:

<event xmlns="http://www.hp.com/2009/software/opr/data_model">
   <title>This is a new event</title>
   <description>This is a description</description>
   <forwarding_info_list>
      <forwarding_info>
         <dns_name>extclt.example.com</dns_name>
         <external_id>IM10219</external_id>
         <external_url>http://extclt.example.com:8081/webtier-9.20/index.do?ctx=docEngine&file=probsummary&query=number%3D%22IM10219%22</external_url>
         <forwarding_type>synchronize_and_transfer_control</forwarding_type>
         <state>originated</state>
      </forwarding_info>
   </forwarding_info_list>
</event>

Submit a List of New Events

The media type for OprEventList objects must be text/xml;type=collection or application/xml;type=collection.

Here is a sample payload showing submittal of a list of events:

<event_list xmlns="http://www.hp.com/2009/software/opr/data_model">
   <event><title>e0</title><severity>critical</severity></event>
   <event><title>e1</title><severity>normal</severity></event>
   <event><title>e2</title><severity>major</severity></event>
   <event><title>e3</title><severity>minor</severity></event>
   <event><title>e4</title><severity>warning</severity></event>
</event_list>