You can query Application Insights telemetry data using Rest API. Application Insights helps us to track applications health in real time. You can track your application availability, performance issues, user’s session and diagnose crashes faster than ever. It provides a real-time dashboard for your app to monitor your application. With the help of Application Insights REST API, you can query the telemetry data on usages, and performance of your applications. You can integrate the REST API with your custom dashboard, build a custom application or even build up your own analytics.
Query Application Insights Telemetry Data using REST API
To get access to Application Insight data, you need Application ID and API Key. To get those details, Open the respective Application Insights dashboard from the Azure Portal. Select the API Access available under Configure option.
API Access window has the Application ID displayed, which is used to identify the application. Get the Application ID from here and click in “Create API Key” Option.
In the Create API Key window, provide a description of your API Keys, and choose the purpose of the API Access -like Read, Write etc.
Once done, select the “Generate Key”.
Once the key is generated. Keep the API key for further reference.
That’s it from here. Now you have the reference of Application ID and API Key, which will allow you to connect with your Application Insight Telemetry records.
Once you have Application ID and API Key, you can make calls against Application Insights API either normal API format, try it using any REST API Client or a basic HTTPClient calls using C# Code. You can also invoke the Application Insights API using cURL.
You can test the API’s using Application Insights REST API Test Explorer
Hope this helps.