Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
The Log Analytics Query API is a REST API that you can use to query the full set of data collected by Azure Monitor logs. You can use the same query language that's used throughout the service. Use this API to retrieve data, build new visualizations of your data, and extend the capabilities of Log Analytics.
You must authenticate to access the Log Analytics API:
The Log Analytics API supports Microsoft Entra authentication with three different Microsoft Entra ID OAuth2 flows:
The authorization code flow and implicit flow both require at least one user interactive sign-in to your application. If you need a non-interactive flow, use the client credentials flow.
After you receive a token, the process for calling the Log Analytics API is the same for all flows. Requests require the Authorization: Bearer
header, populated with the token received from the OAuth2 flow.
To quickly explore the API without using Microsoft Entra authentication, we provide a demonstration workspace with sample data. You can authenticate by using an API key.
Note
When you use Microsoft Entra authentication, it might take up to 60 minutes for the Application Insights REST API to recognize new role-based access control permissions. While permissions are propagating, REST API calls might fail with error code 403.
For information about query limits, see the Query API section of this webpage.
To try the API without writing any code, you can use:
Instead of calling the REST API directly, you can use the idiomatic Azure Monitor Query client libraries:
Each client library is a wrapper around the REST API that allows you to retrieve log data from the workspace.
Events
May 19, 6 PM - May 23, 12 AM
Calling all developers, creators, and AI innovators to join us in Seattle @Microsoft Build May 19-22.
Register todayTraining
Learning path
Analyze monitoring data with Kusto Query Language - Training
Learn how to analyze data in Azure Monitor using Kusto Query Language (KQL).
Certification
Microsoft Certified: Fabric Analytics Engineer Associate - Certifications
As a Fabric analytics engineer associate, you should have subject matter expertise in designing, creating, and deploying enterprise-scale data analytics solutions.