NEED MORE INSIGHT ON HOW TO CONFIGURE APIM FOR ADVANCED USE

Toyin Onagoruwa 1 Reputation point
2022-04-25T08:23:24.63+00:00

I want to ask a couple of questions. Hope you don't mind?

  1. Let's say one of our users made a failed request (i.e 4** code), Is there a functionality on Azure APIM where I can be able to get & log the email/username of that individual that made the request? I know there is a unique Id to each request but it doesn't do any good since I can't use it to map the particular user in question.
  2. Let's say I have more than 1 AKS clusters that the Azure API management points to, Is there a way I can manually allocate the percentage (%) of requests (i.e 70% of traffic goes to cluster A while the remaining 30% of traffic goes to cluster B) to these clusters within the Azure API management tool?

Thanks in advance.

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

1 answer

Sort by: Most helpful
  1. MayankBargali-MSFT 68,751 Reputation points
    2022-04-29T11:38:41.07+00:00

    @Toyin Onagoruwa Thanks for reaching out. Please find my line answer below

    *Let's say one of our users made a failed request (i.e 4** code), Is there a functionality on Azure APIM where I can be able to get & log the email/username of that individual that made the request? I know there is a unique Id to each request but it doesn't do any good since I can't use it to map the particular user in question.*
    There is no out of box feature that can help your requirement. In case if you are using OAUTH then you can get the email id/name information from OAUTH token. You can leverage log events to event hub policy to log those details based on the response from your backend service. In case if you cannot find/using OAUTH then that information cannot be log as the end user will be using subscription key to validate the APIM request.

    Let's say I have more than 1 AKS clusters that the Azure API management points to, Is there a way I can manually allocate the percentage (%) of requests (i.e 70% of traffic goes to cluster A while the remaining 30% of traffic goes to cluster B) to these clusters within the Azure API management tool?
    APIM can only have one backend URL for single API so unfortunately you cannot have more than one endpoint as backend. But you can leverage the Azure traffic manager based on weighted routing that can route the traffic to different AKS endpoint based on your routing configured. Now you can use the ATM endpoint as the backend endpoint in your APIM API's

    0 comments No comments