We have upgraded our integration environment from Portal 4.5 to Portal 5.1.2.
We have detected several cases when invoking PAPI DELETE applications, that it's retruning 400 after 20 seconds.
It seems the error is: "Application deletion incomplete due to unsuccessful key undeployment(s)."
Release : 5.1.2
The problem is coming due to a race condition that is occurring between the portal apim and the proxy gateway. When you send a create, the portal sets a "PENDING DEPLOYMENT" for the application and sends a deploy message to the proxy. After deployment, the gateway returns a "DEPLOYED" to the portal. In the meantime, you asked to delete the application which resulted in setting the status to "PENDING UNDEPLOYMENT". That creates a collision with the response obtained from the proxy gateway who just deployed the application.
This issue that was known by the PM has been resolved in Portal 5.2 .Migration to 5.2 would provide the following benefits: