I have an Azure API Management resource configured with an app running behind it on app services. The Web service URL is set to the app service, and the API URL suffix is not defined (so the root of the API management will forward those requests through to the app service). I'm running into a strange issue where it's throwing 404's if the api endpoints are not pre-defined under the Design section.
Some background information:
- We have an endpoint, such as /api/orders/X
- If I hit /api/orders/X directly on the app service origin, it responds with the information I expect.
- If I hit /api/orders/X through the API management, I get a 404.
- If I hard-code the /api/orders/X endpoint as a testing endpoint, in order to do traces, under Design (per https://learn.microsoft.com/en-us/azure/api-management/api-management-howto-api-inspector), it starts responding with the results I expect (against the API Management fqdn).
- Now if I try /api/orders/Y, I get a 404 again. Once I add /api/orders/Y as a new test under the Design section, this starts responding correctly.
It seems like the API Management wants me to hard-code every possible api request that will be made against this app. Might I have a policy that is controlling this setting that could be misconfigured? If it's helpful, below is a screenshot of the test call to /api/orders/X that was failing until I added the test connection here.
Additionally, after I added this test (to /api/orders/X), the call would work, however another problem was that if I added it with a query parameters, it basically broke any requests that did not contain query parameters (they responded with a 404).
Why might the API Management be throwing 404's in this manner?