Develop > Web Service Interfaces > Event Synchronization Web Service Interface > Synchronize event changes back from external client

Synchronize event changes back from external client

If synchronization is supported by the external application, a REST web service client is needed to synchronize back event changes to the Event Synchronization Web Service. The payload in this back synchronization is expected to comply with native OPR objects. With a Groovy script configured for connected server, the Groovy script interprets the payload that is defined by the client.

If a client wants to submit a new event or a change to an event, but not invoke the Groovy script, the sub-paths event_list or event_change_list must be used. These paths will require native OPR objects (for example, OprEvent or OprEventChangeList). The sub-paths event_list and event_change_list also enable clients to submit one or more events or event changes.

Event Updates

Event Get

In the case of event get, the following data is relevant:

  • HTTP Method: GET

  • Base URL: https://<server.example.com>/opr-gateway/rest/9.10/synchronization/event/<event_id>

  • Payload returned:

    • With a Groovy script configured for the connected server, the Groovy script toExternalEvent() method defines the payload.

    • Without a Groovy script configured for the connected server, the payload is an OprEvent object.

Event Update

In the case of event updates, the following data is relevant:

  • HTTP Method: PUT

  • Base URL: https://<server.example.com>/opr-gateway/rest/9.10/synchronization/event/<event_id>

  • Ping request (from third-party client): HTTP HEAD to base URL

  • Payload received:

    • With a Groovy script configured for the connected server, the Groovy script defines the payload.

    • Without a Groovy script configured for the connected server, the payload must be an OprEvent object.

See also Event update: Logfile Adapter examples.

Event Change Creation

In the case of event changes, the following data is relevant:

  • HTTP Method: POST

  • Base URL: https://<server.example.com>/rest/9.10/synchronization/event_change/<event_id>

  • Ping request (from third-party client): HTTP HEAD to base URL

  • Payload received:

    • With a Groovy script configured for the connected server, the Groovy script defines the payload.

    • Without a Groovy script configured for the connected server, the payload must be an OprEventChange object.

See also Event change creation: Logfile Adapter examples.

Web Service Ping Request

You can also send a ping request from a third-party application. When sending a ping request from a third-party application, the following data is relevant:

  • HTTP Method: HEAD

  • Base URL: https://<server.example.com>/opr-gateway/rest/9.10/synchronization

  • Expected Payload: None

Event List Updates

The following URLs point to the sub-path event_list. Requests to this sub-path do not call the Groovy script and always have input or output of OPR data structures, for example, OprEvent and OprEventList.

Event Get

In the case of event get, the following data is relevant:

  • HTTP Method: GET

  • Base URL: https://<server.example.com>/opr-gateway/rest/9.10/synchronization/event_list/<event_id>

  • Payload returned:

    • The payload is always an OprEvent object.

    • The Groovy script is not called for the sub-path event_list.

Event Update

In the case of event updates, the following data is relevant:

  • HTTP Method: PUT

  • Base URL: https://<server.example.com>/opr-gateway/rest/9.10/synchronization/event_list/<event_id>

  • Payload received and returned:

    • The payload received must be an OprEvent object.

    • The payload returned is always an OprEvent object.

    • The Groovy script is not called for the sub-path event_list.

See also Event update to event_list example.

Event Submit

You can also submit an event from a third-party application. When submitting an event from a third-party application, the following data is relevant:

  • HTTP Method: POST

  • Base URL: https://<server.example.com>/opr-gateway/rest/9.10/synchronization/event_list

  • Payload received:

    • The payload must be an OprEvent or OprEventList object.

    • For an OprEventList object, the media type must be text/xml;type=collection or application/xml;type=collection.

    • The Groovy script is not called for the sub-path event_list.

See also Event submit examples.

Event List Changes

The following URLs point to the sub-path event_change_list. Requests to this sub-path do not call the Groovy script and always have input or output of OPR data structures, for example, OprEvent and OprEventList.

Event Change Creation

In the case of event changes to the sub-path event_change_list, the following data is relevant:

  • HTTP Method: POST

  • Base URL: https://<server.example.com>/opr-gateway/rest/9.10/synchronization/event_change_list/

  • Payload received:

    • The payload received must be an OprEventChange or OprEventChangeList object..

    • For an OprEventChangeList object, the media type must be text/xml;type=collection or application/xml;type=collection.

    • The Groovy script is not called for the sub-path event_change_list.

See also Event change creation for event_change_list examples.