Open wasuradananjith opened 4 years ago
When executing the get-keys command, the apictl will create an application named default-ctl-app. The above issue arises because the APIM was not able to create the default-ctl-app when the custom attributes are defined for applications in that particular APIM instance.
As a workaround, we can manually create an application named default-ctl-app for the particular user from the UI or using REST API. After that, if you execute the get-keys command you will not receive the above error since the application is already created and apictl only needs to generate keys using it.
Description: When you have added custom attributes for applications in the deployment.toml which are required, the get-keys does not work because it cannot create the application when generating keys.
Suggested Labels: Type/Bug Priority/Normal
Affected Product Version: 3.2.0
OS, DB, other environment details and versions: OS: Ubuntu 20.04 LTS
Steps to reproduce:
Note:- This behaviour is common when generating keys for API Products as well
Solution: This problem has arisen because currently when creating the default-ctl-app we pass a specific set of parameters. And those parameters do not contain the customized ones. Hence we need to create a new REST API to generate keys which contain a function that can check whether there are any customized attributes when creating a new application for the first time to generate keys.
[1] https://apim.docs.wso2.com/en/next/learn/consume-api/manage-application/advanced-topics/add-custom-attributes-to-applications/#add-custom-attributes-to-applications