APIM-CLI version
1.14.13
API-Management version
7.7.20250228
Bug description
Sometimes, when I update an existing API (swagger or api-config) and then try to import it using the CLI, I get the following error:
Can't update API-Manager Quota-Configuration. Response: '{"errors":[{"code":500,"message":"Internal server error"}]}'
The thing is, if you try again and again, eventually it works. That makes me think that this is caused by a race condition (e.g.: the API is not yet "fully created" when trying to update the quotas, so the ID is invalid and it returns an error).
I managed to get it working by retrying when the gateway returns this error; I'll submit a pull request.
Steps to reproduce
No response
Relevant log output
2026-05-15 17:30:36,415 [APIManagerAPIAdapter] DEBUG: No existing API found based on filter: []
2026-05-15 17:30:36,417 [RollbackHandler] INFO : Rolled back: [Frontend-API: false, Backend-API: true]
2026-05-15 17:30:36,417 [APIImportApp] ERROR: Can't update Quota-Configuration in API-Manager.
| Can't update API-Manager Quota-Configuration. Response: '{"errors":[{"code":500,"message":"Internal server error"}]}'
com.axway.apim.lib.error.AppException: Can't update Quota-Configuration in API-Manager.
at com.axway.apim.adapter.apis.APIManagerQuotaAdapter.saveQuota(APIManagerQuotaAdapter.java:185)
at com.axway.apim.apiimport.actions.APIQuotaManager.updateRestrictions(APIQuotaManager.java:92)
at com.axway.apim.apiimport.actions.APIQuotaManager.execute(APIQuotaManager.java:55)
at com.axway.apim.apiimport.actions.CreateNewAPI.execute(CreateNewAPI.java:106)
at com.axway.apim.apiimport.actions.RecreateToUpdateAPI.execute(RecreateToUpdateAPI.java:37)
at com.axway.apim.apiimport.APIImportManager.applyChanges(APIImportManager.java:76)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:135)
at com.axway.apim.APIImportApp.importAPI(APIImportApp.java:57)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.axway.apim.cli.APIManagerCLI.run(APIManagerCLI.java:133)
at com.axway.apim.cli.APIManagerCLI.main(APIManagerCLI.java:72)
Caused by: com.axway.apim.lib.error.AppException: Can't update API-Manager Quota-Configuration. Response: '{"errors":[{"code":500,"message":"Internal server error"}]}'
at com.axway.apim.adapter.apis.APIManagerQuotaAdapter.saveQuota(APIManagerQuotaAdapter.java:178)
... 11 more
2026-05-15 17:30:36,419 [APIManagerAdapter] DEBUG: Closing cache ...
APIM-CLI version
1.14.13
API-Management version
7.7.20250228
Bug description
Sometimes, when I update an existing API (swagger or api-config) and then try to import it using the CLI, I get the following error:
The thing is, if you try again and again, eventually it works. That makes me think that this is caused by a race condition (e.g.: the API is not yet "fully created" when trying to update the quotas, so the ID is invalid and it returns an error).
I managed to get it working by retrying when the gateway returns this error; I'll submit a pull request.
Steps to reproduce
No response
Relevant log output