Subscribing to an Event of a Windchill Object Type in the Specified Container
This example shows you how to subscribe to an event that occurs on the specified type of Windchill object in the specified container. Use the following POST request.
URI
POST /Windchill/servlet/odata/EventMgmt/EventSubscriptions HTTP/1.1
Request Headers
Content-Type: application/json
CSRF_NONCE: <Use the value from Fetch NONCE example>
Request Body
{
"Name": "TestContainerSubscription",
"CallbackURL": "https://windchill.ptc.com/Windchill",
"SubscribedEvent@odata.bind": "Events(‘EDIT_IDENTITY’)",
"SubscribedOnEntityType": "PTC.DocMgmt.Document",
"ExpirationDate": "2018-12-20T11:30:00Z",
"SubscribedOnContext@odata.bind": "Containers('OR:wt.pdmlink.PDMLinkProduct:79638')",
"@odata.type":"PTC.EventMgmt.EntityTypeInContainerEventSubscription"
}