Migrate from Logs Query API batch operation and beta version

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:

    1. Go to your Log Analytics workspace in the Azure portal.

    2. In Logs, run the following query:

      LAQueryLogs
      | where TimeGenerated > ago(30d)
      | where RequestTarget contains "/beta/"
      | project TimeGenerated, RequestClientApp, RequestTarget, QueryText
      
  • Check across multiple workspaces:

    1. Go to your Monitor in the Azure portal.

    2. 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 Analytics
query
metadata
https://api.loganalytics.azure.cn/beta/
https://api.loganalytics.io/beta/
Log Analytics via ARM1
query
metadata
https://management.chinacloudapi.cn/.../api/query?api-version=2017-01-01-preview
https://management.chinacloudapi.cn/.../api/metadata?api-version=2017-01-01-preview
Application Insights
query
metadata
metrics
events
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.