Enable logging of developer portal usage in Azure API Management
APPLIES TO: Developer | Basic | Standard | Premium
This article shows you how to enable Azure Monitor logs for auditing and troubleshooting usage of the API Management developer portal. When enabled through a diagnostic setting, the logs collect information about the requests that are received and processed by the developer portal.
Developer portal usage logs include data about activity in the developer portal, including:
- User authentication actions, such as sign-in and sign-out
- Views of API details, API operation details, and products
- API testing in the interactive test console
Enable diagnostic setting for developer portal logs
To configure a diagnostic setting for developer portal usage logs:
In the Azure portal, navigate to your API Management instance.
In the left menu, under Monitoring, select Diagnostic settings > + Add diagnostic setting.
On the Diagnostic setting blade, enter or select details for the setting:
- Diagnostic setting name: Enter a descriptive name.
- Category groups: Optionally make a selection for your scenario.
- Under Categories: Select Logs related to Developer Portal usage. Optionally select other categories as needed.
- Under Destination details, select one or more options and specify details for the destination. For example, archive logs to a storage account or stream them to an event hub. Learn more
- Select Save.
View diagnostic log data
Depending on the log destination you choose, it can take a few minutes for data to appear.
If you send logs to a storage account, you can access the data in the Azure portal and download it for analysis.
- In the Azure portal, navigate to the storage account destination.
- In the left menu, select Storage Browser.
- Under Blob containers, select insights-logs-developerportalauditlogs.
- Navigate to the container for the logs in your API Management instance. The logs are partitioned in intervals of 1 hour.
- To retrieve the data for further analysis, select Download.