How to get the details of who the last user accessed Azure APIM API?

krishna572 876 Reputation points
2022-07-14T00:09:35.117+00:00

Any REST API available that can be used to fetch

  1. API access details of who the user accessed this APIM API recently
  2. How many times that user accessed that API

Can we log these into Event Hub, if possible how?

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

Accepted answer
  1. MayankBargali-MSFT 68,656 Reputation points
    2022-07-14T03:31:31.933+00:00

    @NFSCoder-9821 Thanks for reaching out. APIM does monitor the published APIs but as per the ApiManagementGatewayLogs document only listed details are logged.
    As per your requirement you can leverage the APIM reporting API. For more details on reporting API you can refer to this document.

    API access details of who the user accessed this APIM API recently
    You can call the List by Request API and add the filter (last 4 days from today, apiID etc) as per your requirement. The response will have the details what is the apiID, timestamp and userID which will help to find the details.
    220508-image.png

    How many times that user accessed that API
    We do have List by User API but it gives the overall result so you need to filter with the apiID so you can get the count at the API level.

    **Note: ** Filter may not work for every column, so you need to tweak the result at your client end to do more filtering and get the desired result. Please refer to individual API document for more details. The data is currently retained indefinitely till you are not deleting the APIM instance.

    0 comments No comments

0 additional answers

Sort by: Most helpful