How to import REST API Data

I woulld like to receive data from one of my REST API url and display into the dashboard. Can someone walkthrough the process of configuring the following API?

URL
https://api.oip.tm.com.my/app/iot/1.0/api/plugins/telemetry/DEVICE/365ad9b0-16b7-11e8-ace1-e91f8f4d7baf/values/timeseries?keys=humidity,temp

METHOD
get

Headers
X-Authorization: Token
Authorization:Token

1 Like

Hi,

You probable want to use Simple JSON Datasource plugin. To do that you need to implement a rest api that conforms to simplejson request/response formats and that in turn calls out to your external api.

Please refer to my comment here Grafana simplejson dashboard

Marcus

1 Like

Hi,

You can use grafana JSON data source as @mefraimsson explained for specific use cases.

Otherwise for simple use cases, you can use Infinity datasource. This is generic implementation for making API requests from Grafana.

NB: I am the author of the plugin.

Thanks,
Sriram

4 Likes

Hi @yesoreyeram,

Inifinity Datasource looks great. I have one doubt though, does it have support for Authorization headers? My usecase is to display JSON data from an API protected by Bearer token.

Thanks,
Omkar

1 Like

Hi, im new to grafana, and try out the sriram plugin but an error comes up

1 Like

Currently simple username/password or any header based tokens supported.