Retrieve the the stored value from a field from an hour ago. | ThingSpeak API | Forum


Please consider registering

sp_LogInOut Log In sp_Registration Register

Register | Lost password?
Advanced Search

— Forum Scope —

— Match —

— Forum Options —

Minimum search word length is 3 characters - maximum search word length is 84 characters

sp_Feed sp_TopicIcon
Retrieve the the stored value from a field from an hour ago.
No permission to create posts
August 23, 2017
10:47 am

Forum Posts: 9
Member Since:
July 5, 2016
sp_UserOfflineSmall Offline

Hi, I know how to retrieve the last stored value, but how would I go about retrieving a value from an hour ago?

August 23, 2017
1:40 pm

Forum Posts: 210
Member Since:
March 7, 2017
sp_UserOfflineSmall Offline

For a REST API call, from a device for example, use the start and end parameters in you rest call. The process to get a channel feed field  is shown in the doc here.  The call is a GET and looks like this


The format is 

start (datetime) Start date in format YYYY-MM-DD%20HH:NN:SS (optional)

end (datetime) End date in format YYYY-MM-DD%20HH:NN:SS (optional)

You should also append your api_key if it is a private channel &api_key=xxxxxxxxxxxxxxxx.

The example for map path visualization that shows you how to do it in MATLAB, using the thingSpeakRead() function.

data = thingSpeakRead(73734,'DateRange',... [datetime('today')-caldays(10),datetime('today')],'outputFormat','table');
Forum Timezone: America/New_York

Most Users Ever Online: 114

Currently Online:
15 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 261

Vinod: 196

piajola: 85

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 5703

Moderators: 0

Admins: 2

Forum Stats:

Groups: 4

Forums: 17

Topics: 1313

Posts: 4565

Newest Members:

harriettlf60, ShaToow, Aleftinfenny, DiaBentee,, Pisaruk530

Administrators: Hans: 387, lee: 457