英文:
Application Insights REST API difference between 'get' and 'execute'
问题
我想从Azure应用程序洞察中查询数据。在Azure REST API参考中,它们有两个操作:
- 执行
- 获取
问题在于它们都是"执行分析查询"。它们之间有什么区别,应该使用哪一个?
英文:
I want to query data from Azure Application Insights. In Azure REST Api reference, they have two operations:
- execute
- get
The problem is that they both "Execute an Analytics query". What's the difference between them and what should one use?
答案1
得分: 0
唯一的区别在于,要执行查询,您需要使用POST方法,并将查询详情包含在请求体中,而要获取查询结果,则需要使用GET方法,并在URL参数中包含查询详情。
使用哪种方法取决于个人偏好。如果您不希望在日志中记录执行的查询,您可能更喜欢使用POST方法,因为查询文本不是URL参数。
英文:
The only difference is that to execute a query you need to do a POST with the query details in the body whereas getting a query result you need a GET with the query details in the url parameters.
Which one to use is a matter of preference. If you don't want executed queries in your logs you might prefer the POST since the query text is not a url parameter.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论