Is it possible for and API in Azure APIM to invoke another API on the same APIM instance internally.

Kumar 111 Reputation points
2022-09-22T20:42:57.93+00:00

We have an Azure APIM instance with custom DNS configured within a vNet. The APIM instance is fronted by Azure Front Door.

We currently have a need to implement a layered API architecture where an Api-X in APIM will need to invoke another API-Y within the same APIM instance. We would like to the connection between Api-X and Api-Y be internal and not have to route through front door that adds additional latency.

When we use the Api-Y Uri (with custom APIM DNS) as a backend from Api-X, we are getting an error saying

"Host (APIM) refused connection from IP (APIM private IP)".

I am curious to know if it is possible to setup internal connectivity between different APIs within the same APIM instance.

Please clarify.

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
1,959 questions
0 comments No comments
{count} votes

Accepted answer
  1. JananiRamesh-MSFT 24,111 Reputation points
    2022-09-26T12:48:22.747+00:00

    Hi @Kumar Thanks for reaching out. Yes, it is possible for an api in Azure APIM to call other API in the same APIM instance. This can be achieved by writing a send-request policy or forward request policy
    https://learn.microsoft.com/en-us/azure/api-management/api-management-advanced-policies#SendRequest
    https://learn.microsoft.com/en-us/azure/api-management/api-management-advanced-policies#ForwardRequest

    But it has few limitations if the APIM instance is deployed in an internal vnet. please follow this blog for more details https://techcommunity.microsoft.com/t5/azure-paas-blog/self-chained-apim-request-limitation-in-internal-virtual-network/ba-p/1940417

    let me know incase of further queries, I would be happy to assist you.

    Please 'Accept as answer' and ‘Upvote’ if it helped so that it can help others in the community looking for help on similar topics.


0 additional answers

Sort by: Most helpful