Need help in implementing an apim policy to distinguish between client using url and internal users url (with http triggers)

Prabha 236 Reputation points
2023-03-06T09:02:04.85+00:00

I have an API management instance with my custom domain (https://myapi-test.com) with several API's (function apps). I need to implement a policy to distinguish where APIM redirects to clients url ( without http triggers) and url with httptriggers used by Internal team (developers and testers)

Clients wants to use the below Urls:

myapi-test.com/DEV/Details (Details function app api)

myapi-test.com /UAT/Details (Details function app api)

myapi-test.com/DEV/Order (Order function app api)

myapi-test.com/UAT/Order (Order function app api)

myapi-test.com/UAT/Invoice (Invoice function app api)

myapi-test.com/UAT/Invoice (Invoice function app api)

we know that API suffixes can't be the same( like we can’t use same suffix DEV for all apis in the apim), so for example, " myapi-test.com /DEV/Details" and " myapi-test.com /DEV/Order" can't be defined anyway.

myapi-test.com/DEV/Details ( http triggers are list and listdetails)

so, the suffixes would need to be something like this 

myapi-test.com/DEV/DetailsCall

myapi-test.com /DEV/Price(Price is function app for Order and Invoice) therefore calling "http triggers" client won't be using, but developers and testers will, could be something like below:

myapi-test.com/DEV/Details/list

myapi-test.com/DEV/Details/listdetails

and likewise we have for price function app

myapi-test.com/DEV/Price/Order

myapi-test.com/DEV/Price/ Invoice

 but the one address that matters to client is 

myapi-test.com/DEV/Details

myapi-test.com/DEV/Order

myapi-test.com/DEV/Invoice

 so, it would be great if some sort of policy in APIM or something could catch the address call and redirects it to correct address. I mean if we could write any policy, if yes at which level we need o apply the policy, if we can distinguish between the client’s url usage and internal users (developers/testers) url usage

myapi-test.com/DEV/Details(clients matters only this address)---> myapi-test.com/DEV/Details/list (dev/test team should knows this address)

myapi-test.com/DEV/Details---> myapi-test.com/DEV/Details/listdetails

myapi-test.com /DEV/Order   ---> myapi-test.com /DEV/Price/Order

myapi-test.com /DEV/Invoice ---> myapi-test.com/DEV/Price/Invoice

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