I am trying to configure an application gateway to access my management API set to internal mode but when trying to access my api I get resource not found
This is the configuration of the application gateway:
-
I have a Frontend IP: PUBLIC IP
-
I have a listener that is associated with the frontend ip
-
I have rule associated with the listener
-
This is my backend setting and backend pool
- I set up these health probes
When I test the echo api, it responds with 200
root@ubuntu-pod:/# curl -I -H "Ocp-Apim-Subscription-Key: XXXXX" http://PUBLIC_IP/echo/resource
HTTP/1.1 200 OK
Date: Thu, 01 Aug 2024 11:20:14 GMT
Content-Length: 0
If I try to access an api that points to a microservice deployed in an aks, I get the following error
root@ubuntu-pod:/# curl -H "Ocp-Apim-Subscription-Key: XXXXX" http://PUBLIC_IP/microservice/employees
{ "statusCode": 404, "message": "Resource not found" }
What do I need to configure?
In the management api I have set these 2 custom domains:
I validate that I get a response when I test from the api management endpoint:
root@ubuntu-pod:/# curl -H "Ocp-Apim-Subscription-Key: XXXXXX" http://apim-gw.contoso.net/microservice/employees
[{"empId":"1","name":"emp1","designation":"manager","salary":3000.0},{"empId":"2","name":"emp2","designation":"developer","salary":3000.0}]