'How to remove subscription policy in wso2 apim 4.0.0
I have an up and running wso2 apim 4.0.0. I have created some subscription policies in admin portal, then applied them on certain apis on publisher portal. Now if I remove them on admin portal after unchecking on publisher, I am not able to change the api.
The UI of the publisher keeps popping up the message - "Something went wrong when updating the api". Wso2carbon.log prints
TID: [-1234] [api/am/publisher] [2022-05-18 14:31:38,333] ERROR
{org.wso2.carbon.apimgt.rest.api.publisher.v1.impl.ApisApiServiceImpl} - Error while updating
the API : 008d1f21-56b9-4356-a335-3c190ae9e86c - Specified tier(s) [Minimum] are invalid
org.wso2.carbon.apimgt.api.APIManagementException: Specified tier(s) [Minimum] are invalid
******************************************************************************************
TID: [-1234] [api/am/publisher] [2022-05-18 14:31:38,499] WARN
{org.wso2.carbon.apimgt.impl.utils.APIUtil} - Unknown tier: Minimum found on API:
MyApi
The question is why it keeps looking for the deleted tier if it is not used (unchecked) in subscriptions on publisher portal? How to safely delete the custom subscription policy so that I can avoid aforementioned error?
Solution 1:[1]
I can also experience the same behavior with the product. As a workaround, I was successfully able to get the API back as below:
- reload the API if it's not loaded after the deletion
- go to the subscriptions tab of that API
- if there are no subscription policies available as selected select any of them and click save (if there are any selected ones available, just click save)
- Go to the Business Info or Basic Info tab and click Save to see if it still comes
Further preventing deleting subscription policies assigned to APIs I have opened a git issue [1]. You can track the issue there.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Yasas |
