1

I have a requirement where I need to search a particular term in App insights and then export this 'report' and send it in the email. Consider this as "report a bug" use case.

So if I search key "xxxxxx123", it should retrieve all matching traces/logs and then export it to either excel or CSV.

So my question is, is it possible with the NuGet package or even with REST API?

I tried looking at this, but couldn't find it helpful, dev.applicationinsights.io/apiexplorer

Max
  • 1,528
  • 21
  • 33

1 Answers1

2

There is no nuget package. You can do it by using the Get query rest api.

Write any query you need in the Query textbox, then in the right side, you can see the generated request. Then you can use c# or other programming language to query the results, as per this article.(Note: remember use your real Application ID and API Key).

Add a screenshot for your reference:

enter image description here

After fetch the data, you should write your own logic to export it to csv or excel.

Ivan Glasenberg
  • 29,865
  • 2
  • 44
  • 60