Develop > Web Service Interfaces > Event Synchronization Web Service Interface > Event change creation: Logfile Adapter examples

Event change creation: Logfile Adapter examples

You can submit event changes with an event change creation. The HTTP method in this case is POST, and the expected payload for the LogfileAdapter is an OprEventChange. The examples in this section show sample XML payloads for each supported update. If a Groovy script is not configured for the connected server, the Event Synchronization Web Service expects an OprEventChange object. Each of the samples that follow represent an OprEventChange object.

The Event Synchronization Web Service supports sending multiple properties in a single payload. The following examples each show just one changed property, with the exception of the last sample, which shows two changed properties (see Change Multiple Properties in One Call).

The examples use an event ID of 531d2673-683f-429f-a742-b8680ee01a76. Change this event ID to the ID of the specific event for which you wish to create a change object. The correct HTTP method for the creation of an event change is the POST method.

You can also use the event change list web service to get examples of event change objects. You can access the event change list web service using this URL:

https://<server.example.com>/opr-web/rest/9.10/event_change_list

An example call for an event change creation is shown below.

The following sample call for an event change creation is for a connected server named logger with password set to Password1, and attempts to create an event change for an event with ID 531d2673-683f-429f-a742-b8680ee01a76. For an event change, the event ID must be passed in the payload, and is not part of the URL. The sample call looks like this:

RestWsUtil -create create.xml-url "https://<server.example.com>/opr-gateway/rest/9.10/synchronization/event_change/<event id>" -username logger -password Password1 -verbose

The samples that follow show possible XML payloads for the call. The payloads are contained in the create.xml file referenced in the call to the RestWsUtil command-line utility.