ThingWorx Model Definition in Composer > Modeling > Things > Thing Subscriptions > Programmatically Enabling and Disabling Subscriptions
Programmatically Enabling and Disabling Subscriptions
Subscriptions can be programmatically enabled and disabled by using the EnableSubscription and DisableSubscription services.
Service Parameters
The following parameter is available in both services:
Parameter
Basetype
Description
subscriptionName
STRING
Name of the subscription.
Service Notes
You cannot enable or disable a subscription on a Thing that was inherited from its Thing Template or Thing Shape. You can only enable and disable subscriptions at the level at which it was defined.
Dynamic subscriptions are in-memory only. If you restart ThingWorx or restart either of the Things involved in the subscription, the subscription is lost. For example, if you have a dynamic subscription to a timer event on a timer from another Thing, and you restart the timer Thing, the subscription will no longer be triggered.
Non-administrator users can use these services.
Was this helpful?