Jump to: navigation, search

CometD notifications

You can subscribe to the /v2/me/openmedia topic to receive CometD notifications for the Open Media API. This topic provides messages related to OpenMedia interactions, including changes to OpenMedia interaction state and updates to OpenMedia interaction data. It supports the following message types:

OpenmediaStateChangeMessage

Property Description
data The data element is present in all CometD notifications and is the root JSON element. You can use data.messageType to identify the message and determine what other properties should be present.
data.messageType This property identifies the message type, in this case OpenmediaStateChangeMessage.
data.notificationType This property further identifies the type of notification and can have one of the following values:
  • StatusChange — The status of the openmedia interaction has changed.
  • PropertiesUpdated — The openmedia data has changed.
  • Error — This is sent when an operation on the openmedia resource fails.
data.openmedia An openmedia resource with the updated state and capabilities.
data.referenceId The reference identifier is used to link the notification to the original request that created it.

Example

{  
   "data":{  
      "openmedia":{  
         "state":"Processing",
         "capabilities":[  
            "Transfer",
            "AttachUserData",
            "UpdateUserData",
            "DeleteUserData",
            "SetInFocus",
            "Complete"
         ],
         "id":"03W0GH2KD56YV000",
         "mediaType":"promotion",
         "openmediaType":"Outbound",
         "uri":"http://localhost:8090/api/v2/openmedia/promotions/03W0GH2KD56YV000"
      },
      "referenceId":1,
      "notificationType":"StatusChange",
      "messageType":"OpenmediaStateChangeMessage"
   }
}
This page was last edited on February 15, 2024, at 19:11.
Comments or questions about this documentation? Contact us for support!