Application Insights REST API中’get’和’execute’之间的区别

huangapple go评论77阅读模式
英文:

Application Insights REST API difference between 'get' and 'execute'

问题

我想从Azure应用程序洞察中查询数据。在Azure REST API参考中,它们有两个操作:

  1. 执行
  2. 获取

问题在于它们都是"执行分析查询"。它们之间有什么区别,应该使用哪一个?

英文:

I want to query data from Azure Application Insights. In Azure REST Api reference, they have two operations:

  1. execute
  2. 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.

huangapple
  • 本文由 发表于 2023年2月18日 19:36:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/75493061.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定