louisyu
louisyu

Reputation: 1

Application Insights: Metadata queries through REST api

Is it possible to submit Application Insights metadata commands via the REST api? Is the best I can do just what is returned by GET /query/schema?

i.e

.show table requests | project AttributeName...

Upvotes: 0

Views: 271

Answers (1)

EranG
EranG

Reputation: 862

The syntax you asked for is part of the supported query language. For full listing of supported API, you can visit https://dev.applicationinsights.io.

If you need to programmatically query a table's schema you can use:

requests | getschema

Plugging it to the test tool yields the following request: https://dev.applicationinsights.io/apiexplorer/query?appId=DEMO_APP&apiKey=DEMO_KEY&query=%20customEvents%20%7C%20getschema%0A

Alternatively, you can query the whole schema in a single query by using https://dev.applicationinsights.io/apiexplorer/querySchema?appId=DEMO_APP&apiKey=DEMO_KEY. This will give you a list of all columns of all tables.

Out of curiosity - why would you want to do it through the REST API?

`

Upvotes: 0

Related Questions