Troubleshoot API(s) imported via self-hosted gateway

Deepakraj P 0 Reputation points
2025-04-02T07:29:41.16+00:00

If I expose an API which is running in a VM in a specific port to internet, and import it to Azure APIM via managed gateway, it is working fine. API is accessible with get operation and URL scheme set to https though the API is http only. But the same API when imported via self-hosted gateway which is running in AKS cluster, the error states below error in logs.
lastError: {"source":"configuration","reason":"OperationNotFound","message":"Unable to match incoming request to an operation.","section":"backend"}

AKS has access to specific port on the VM where API is running. What could be the issue, how to troubleshoot and resolve it?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,369 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Deepakraj P 0 Reputation points
    2025-04-24T09:18:14.5566667+00:00

    Hi everyone who's looking for answer or following up on this question, I would like to let you know that the issue has been resolved. In fact, there is no issue at all. If I'm importing and managing API via self-hosted gateway I won't get response for APIM endpoint even in test tab. Don't understand why no one has mentioned about that so far. You will get the intended response if you just replace APIM endpoint with Loadbalancer IP of the service deployed as part of self-hosted gateway. Don't forget to use correct protocol, if not you'll get same 404 Operation Not Found error.

    Hope it helps everyone. Happy exploring.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.