Symptoms
There are subscriptions in the status "Terminated/Stopped", which can be irrevocably destroyed by clicking "Destroy" button. Is there any way to do the same with API?
Cause
The setting "Destroy Service on Cancel" is set to "No" in the service template the subscriptions are based on. Changing this setting will only influence newly cancelled subscriptions
Answer
It is possible to destroy the subscription with a set of API calls:
On POA side the subscription is to be removed completely, therefore pem.removeSubscription must be called.
- On PBA side the subscription status is to be changed to Terminated/Removed, which can be done with SubscriptionStatusUpdate_API (status - 60, ServStatus - 90).
NOTE: API request can be sent with 'curl' utility. Example:
For OA:
curl -k -d@ApiRequest.xml https://127.0.0.1:8440
For BA:
curl -k -d@ApiRequest.xml https://127.0.0.1:5224
, where ApiRequest.xml
is a file containing API request code.