Error updating an application with several APIs associated, with at least one API deprecated
book
Article ID: 406162
calendar_today
Updated On:
Products
CA API Developer Portal
Issue/Introduction
We have the following scenario:
1 application with 2 APIs associated
The 2 APIs were associated to the application when they are in "enabled" state
After the 2 APIs were associated to the application, one of them was changed to "deprecated"
When trying to update the application, for example changing its description, calling to "/portal/Applications('606d320d-7231-46c3-9d1b-82d077f67957')", Portal returns the following error:
{ "field" : "ApiApiPlanIds", "error" : "Invalid API plan mappings detected. [ApiApiPlan{apiUuid='df45a132-bf4e-4d94-8517-86cf0de3a333', apiPlanUuid='79fe4768-d93d-4d86-8dc6-f3e9e7e52907'}]", "key" : "error.validation.applications.save.invalid.apiapiplan" }
Is this normal behavior?
Environment
5.3.2
Resolution
When you attempt to update the application (even just its description — not the API mapping), the Portal throws:
{ "field" : "ApiApiPlanIds", "error" : "Invalid API plan mappings detected. [ApiApiPlan{apiUuid='df45a132-bf4e-4d94-8517-86cf0de3a333', apiPlanUuid='79fe4768-d93d-4d86-8dc6-f3e9e7e52907'}]", "key" : "error.validation.applications.save.invalid.apiapiplan" }
This is expected behavior in Layer7 Portal (and is commonly encountered).
In Layer7 Portal, an application must only be linked to valid API plans.
If an API is deprecated (or its plan is deprecated/removed), the system invalidates the API plan mapping for any applications still referencing it.
When you update an application, the Portal revalidates the current API subscriptions. If one is no longer valid (e.g., the API is deprecated), you get an error like this.
So it’s not about your change to the description — it’s about the Portal trying to ensure the entire application config is valid before saving.
The issue is , The API is deprecated but your app still references its plan. and thus the API portal wont let keep an invalid subscription.
This is by default the design in Layer7 Portal — deprecated or deleted APIs invalidate subscriptions to keep the API catalog and usage clean.