trying to get receive informations via the Instana REST API. Looks like that:
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]"}'
Getting back that error:
{
"code": 405,
"message": "HTTP 405 Method Not Allowed"
}
The matching Curl script (which I can't use) looks like that and works:
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]
Any idea?