I want to expose the Internal APIs through Azure API Management however the gateway is unable to access resources within the virtual network.
Below is my VNet configuration
Below is my API Management Network settings
I have created a Azure VM as shown below
and deployed the Spring Boot application as shown below
Tried configuring the APIs in the API Management however the gateway is unable to access the above internal URL
Update: If I save the API definition and upload on APIM it works without any issues.
When you create an API in APIM from portal, if you put the OpenAPI (swagger) spec URI in the field shown in the screen, it has to be publicly accessible (not necessarily the API itself, but the spec). It's because you are browsing the Azure portal from internet and portal UI form simply tries to access the file from your client side browser before uploading. I agree that it could be nicer if APIM could access it from the server side, but unfortunately that's not the case at this moment. Consider it as a simple feature which either allows to to upload file from your machine or from a URL publicly accessible.
EDIT*: Looks like VNET is not into picture in management plane.
In this case, you can just download the swagger file itself and use the "Select a file" option.
Thank you for your inputs. However, I have tried the scenario on both the remote machine and on a VM connected to the same VNET and it failed in both the scenarios. Meaning irrespective of the network connection it fails but manual upload works without any issues.
Looks like VNET is not into picture in management plane.