Develop > Web Service Interfaces > Event Synchronization Web Service Interface > Event change creation for event_change_list examples

Event change creation for event_change_list examples

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

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

Submit a New Event Change

Here is a sample payload showing submittal of a title change:

<event_change xmlns="http://www.hp.com/2009/software/opr/data_model"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <event_ref>
      <target_id>531d2673-683f-429f-a742-b8680ee01a76</target_id>
   </event_ref>
   <changed_properties>
      <string_property_change>
         <property_name>title</property_name>
         <current_value xsi:type="xs:string">Some title for the event.</current_value>
      </string_property_change>
   </changed_properties>
</event_change>

Submit a List of New Event Changes

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

Here is a sample payload showing submittal of a title change for one event, and a state change for another event:

<event_change_list xmlns="http://www.hp.com/2009/software/opr/data_model">
<event_change xmlns="http://www.hp.com/2009/software/opr/data_model"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <event_ref>
      <target_id>531d2673-683f-429f-a742-b8680ee01a76</target_id>
   </event_ref>
   <changed_properties>
      <string_property_change>
         <property_name>title</property_name>
         <current_value xsi:type="xs:string">Some title for the event.</current_value>
      </string_property_change>
   </changed_properties>
   </event_change>
<event_change xmlns="http://www.hp.com/2009/software/opr/data_model"
              xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xmlns:xs="http://www.w3.org/2001/XMLSchema">
   <event_ref>
      <target_id>ad726f4f-ba51-409f-b429-b445b791ac9d</target_id>
   </event_ref>
   <changed_properties>
      <state_change>
         <property_name>state</property_name>
         <current_value xsi:type="xs:string">in_progress</current_value>
      </state_change>
   </changed_properties>
</event_change>
</event_change_list>