grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
65.34k stars 12.19k forks source link

API methods return json responses with Content-Type: text/plain #6160

Closed DanCech closed 8 years ago

DanCech commented 8 years ago

Please include this information:

The ApiSuccess function uses Respond rather than Json, which means that the incorrect Content-Type header is sent in API success messages. text/plain is sent but the actual content is a JSON object like {"message":"Organization updated"}.

In pkg/api/common.go line ~82 should be changed from return Respond(200, resp) to return Json(200, resp).

CJosePhD commented 8 years ago

I want to incorporate a clustering algorithm into our Graphite/Grafana environment. The code is written and its format is a tuple (cluster#:dataValue).

How should the data be sent to the pie, histogram or heat map chart?

Regards, Carl

Sent from my iPhone