Subscribing to an Event of a Windchill Object Instance
This example shows you how to subscribe to an event that occurs on the specified Windchill object instance. 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": "TestSubscriptionForDoc",
"CallbackURL": "https://windchill.ptc.com/Windchill",
"SubscribedEvent@odata.bind": "Events(' CHANGE_LIFECYCLE_STATE')",
"LifeCycleState":
{"Value": "RELEASED"},
"SubscribedOnEntity@odata.bind": "WindchillEntities('OR:wt.doc.WTDocument:4326293')",
"SubscribeAllVersions": true,
"@odata.type":"PTC.EventMgmt.EntityEventSubscription"
}
Was this helpful?