Query Azure Application Insights

Hi :wave:

I would like to integrate Azure Application Insights into my Redash Dashboard using the JSON data source. (It would be nice if there was a built in data source for that).

By design from Azure the API key may not be passed in the URL. The only option is to include it in the header when making the cURL request using x-api-key. Is there any possible way to include a header when making the call with the JSON data source or any other way to gain access to Azure Application Insights in Redash?

A typical request would look like:

curl "https://api.applicationinsights.io/v1/apps/<application-id>/metrics/requests/failed?timespan=P7D&interval=P1D" -H "x-api-key: <APIKey>"

Thanks in advance :slight_smile:

I solved the issue after a little trial-and-error :slight_smile:

The solution was to include a key in the header with the api-key value and then select the path for the data i wanted in the request.

Final request for querying data at Azure Application Insights with Redash using the JSON Data Source (at the moment)

url: https://api.applicationinsights.io/v1/apps/<Application-ID>/metrics/requests/failed?timespan=P7D&interval=PT1H
    x-api-key: <API-KEY>
path: <path for data>

Nailed it :wink:

The full list of options for the JSON data source can be found here.

1 Like