尝试通过Instana REST API获取接收信息。看起来是这样的:
https://[URL]/api/application-monitoring/metrics/applications?'Content-Type: application/json' -d '{"timeFrame": {"windowSize": [SIZE], "to": [SIZE]}, "metrics": [{"metric": "calls", "aggregation": "SUM"}, {"metric": "errors", "aggregation": "MEAN"}, {"metric": "latency", "aggregation": "MEAN"}, {"metric": "latency", "aggregation": "MIN"}, {"metric": "latency", "aggregation": "MAX"}], "nameFilter":"[NAME]"}'找回那个错误:
{
"code": 405,
"message": "HTTP 405 Method Not Allowed"
}匹配的Curl脚本(我不能使用)看起来是这样的,并且可以工作:
curl -H 'Authorization: apiToken <APITOKEN>' -H 'Content-Type: application/json' -d '{"timeFrame": {"windowSize": [SIZE], "to": [SIZE]}, "metrics": [{"metric": "calls", "aggregation": "SUM"}, {"metric": "errors", "aggregation": "MEAN"}, {"metric": "latency", "aggregation": "MEAN"}, {"metric": "latency", "aggregation": "MIN"}, {"metric": "latency", "aggregation": "MAX"}], "nameFilter":[NAME]}' [URL]有什么想法吗?
发布于 2019-10-24 00:43:01
该终结点需要POST,您似乎正在使用GET。因此不允许使用该方法。
https://stackoverflow.com/questions/58518001
复制相似问题