| author | dlepow | |
|---|---|---|
| ms.service | azure-api-management | |
| ms.topic | include | |
| ms.date | 07/09/2025 | |
| ms.author | danlep | |
| ms.custom |
|
To configure a diagnostic setting for collection of resource logs:
-
In the Azure portal, navigate to your API Management instance.
-
In the left menu, under Monitoring, select Diagnostic settings > + Add diagnostic setting.
:::image type="content" source="media/api-management-diagnostic-settings/monitoring-menu.png" alt-text="Screenshot of adding a diagnostic setting in the portal.":::
-
On the Diagnostic setting page, 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 one or more categories. For example, select Logs related to ApiManagement Gateway to collect logs for most requests to the API Management gateway.
- Under Destination details, select one or more options and specify details for the destination. For example, send logs to an Azure Log Analytics workspace, archive logs to a storage account, or stream them to an event hub. For more information, see Diagnostic settings in Azure Monitor.
- Select Save.
[!TIP]
- To view API analytics in the Azure Monitor-based dashboard for API Management (Monitoring > Analytics blade), select an Azure Log Analytics workspace as the destination.
- If you select a Log Analytics workspace, you can choose to store the data in a resource-specific table (for example, an ApiManagementGatewayLogs table) or store in the general AzureDiagnostics table. We recommend using the resource-specific table for log destinations that support it. Learn more
-
After configuring details for the log destination or destinations, select Save.
Note
Adding a diagnostic setting object might result in a failure if the MinApiVersion property of your API Management service is set to any API version higher than 2022-09-01-preview.
Note
To enable diagnostic settings for API Management workspaces, see Create and manage a workspace.