Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The Azure Monitor Logs Query API is deprecating the batch query operation and the beta API version. Support for these features is available according to the following timelines:
| Support cutoff date | Deprecation | Migration steps |
|---|---|---|
| March 31, 2026 | Logs Query API beta version |
Change beta path to v1 |
| March 31, 2028 | Logs Query API batch operation |
Split batch queries into single queries |
Check if the Logs Query API beta version is used
Note
There's currently no direct UI in the Azure portal that explicitly flags usage of the deprecated beta API version.
Enable query auditing
Create a diagnostic setting in your Log Analytics workspace and select:
- Logs: audit
- Destination details: Send to Log Analytics workspace
Query auditing allows you to use the LAQueryLogs table to detect API usage patterns. Specifically, look for entries where the RequestTarget or RequestClientApp fields indicate use of the beta API.
Check logs for API beta version
Check one specific workspace:
Go to your Log Analytics workspace in the Azure portal.
In Logs, run the following query:
LAQueryLogs | where TimeGenerated > ago(30d) | where RequestTarget contains "/beta/" | project TimeGenerated, RequestClientApp, RequestTarget, QueryText
Check across multiple workspaces:
Go to your Monitor in the Azure portal.
In Logs, run the following query:
union workspace("workspace-id-1").LAQueryLogs, workspace("workspace-id-2").LAQueryLogs, workspace("workspace-id-3").LAQueryLogs | where TimeGenerated > ago(30d) | where RequestTarget contains "/beta/" | project TimeGenerated, RequestClientApp, RequestTarget, QueryText
Change beta path to v1
To migrate from the beta version of the Logs Query API, change the path in your API calls from beta to v1.
| Operation group reference | URI examples |
|---|---|
Log Analyticsquerymetadata |
https://api.loganalytics.azure.cn/beta/https://api.loganalytics.io/beta/ |
Log Analytics via ARM1querymetadata |
https://management.chinacloudapi.cn/.../api/query?api-version=2017-01-01-previewhttps://management.chinacloudapi.cn/.../api/metadata?api-version=2017-01-01-preview |
Application Insightsquerymetadatametricsevents |
https://api.applicationinsights.azure.cn/beta/https://api.applicationinsights.io/beta/ |
1Log Analytics queries via ARM should migrate to the Logs Query API v1 request format.
Split batch queries to single queries
To migrate batch API calls, split every query that you previously sent as part of the requests array in the body of the message and use the query section in the request format instead.
If you use an Azure SDK client library to initiate batch queries, split batched queries to run as separate queries using the corresponding methods.
| Ecosystem | Package |
|---|---|
| .NET | Azure.Monitor.Query |
| Go | azlogs |
| Java | azure-monitor-query |
| JavaScript | @azure/monitor-query |
| Python | azure-monitor-query |
Make adjustments to handle the response using the Logs Query API response format.