REST API GET value for a single resource


I’ve a device that has 3 resources (Temp, Hum and HeatIdx). Is there a way through HTTP GET to get the value of, for instance the TEMP?

Currently I’ve tried the following:***

And I’m getting protoson code for the 3 resources:


The goal is to get only individual readings so I can pass it to an Android Widget.

Thank you


in this case, just create a single resource for each reading (humidity, and temperature), like:

thing["humidity"] >> [](pson& out){
    out = dht.readHumidity();

thing["temperature"] >> [](pson& out){
    out = dht.readTemperature();

And just query each resource indiviually:***

Hope it helps!

i want to display my dht sensor data from thinger io api into my own website. what should i do, exactly what should i learn. i’m beginner and i don’t find tutorial yet for this issue.

i just have html code for where the data is displayed.

Hello @Ahmad_Adeska,

There are different ways to do this integration. If you want to show the data represented in a widget, you can create it in a dashboard and then share it and introduce the hole dashboard into your website using an “Iref”.

But if you only want to extract the raw data, for example, one that is stored in a data bucket, you have to do two steps:

  1. create an access token with authorization to access to the bucket and read its data. You can learn how to manage access tokens in this part of documentation:
  2. call bucket API including the authorization and some parameters to select the last stored data as in the example below:

when calling this api you will receive the hole row, so you will need to select the data you want to show with the specific key:

A third option could be call directly to the device resource, as is explained in the second post of this conversation. Did you have problems with that?


I already create an access token, but I have no idea how to call the bucket api.

I want to display it using php, but I only get the code for the led. whereas i use dht sensor. and this is an error that I got. Thank you in advance

Hello @Ahmad_Adeska,

just to be sure that your HTTP query is well defined, try this:

  1. go to Thinger Endpoints tab
  2. create a new endpoint with HTTP configuration, GET message,and paste there your query as shown in the image below:
  3. Save the configuration and click in the “test endpoint” button on the right top of this interface
  4. test the endpoint by clicking in the bottom button and show the result message:

If this is working fie… the problem is on your PHP code,



what if i want to get not only the last item but the previous day (or days, weeks, etc) of set of data, are there other parameters that we can use?


Hello @mong,

I think you have to work with the Timestamp value to retrieve the right data with min and max URL parameters:


it has to be your program what makes the Ts selection

hope it helps!

thanks! that work!

observation: the maximum stream that can be pulled using this method is 200 data points. is this the maximum for the api?


hahah yes, it is to maximum for the community server API.