Finer grained retrieval of most recent data than integer "days" | 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
Finer grained retrieval of most recent data than integer "days"
No permission to create posts
March 31, 2017
8:13 am
New Member
Forum Posts: 4
Member Since:
October 5, 2016
sp_UserOfflineSmall Offline

I would like to use the API on Channels and Channel Fields to request the most recent N minutes or seconds of data. However, the API only allows integer days. Is there a reason for this restriction. Can a future update include "minutes=N" or "seconds=N"?


March 31, 2017
3:26 pm

Forum Posts: 87
Member Since:
October 12, 2015
sp_UserOfflineSmall Offline

Hello rvnash,

You can click this link 00:00:00&end=2017-03-31 00:01:00&offset=-05.00

it is channel 9 field 1 chart for today since midnight for a lapse of 1 minute showing some points about each 15 seconds, checked in Chrome-W10 but I believe any modern browser will do.

In a plug-in the javascript code to pick the needed points is something like this

$.getJSON('' + channel_id + '/fields/' + field_number + '.json?offset=0&round=2&results=' + results + '&api_key=' + api_key, function( .... etc, etc

Hope this very little information is of some help Smile

September 6, 2017
12:22 am
New Member
Forum Posts: 2
Member Since:
September 6, 2017
sp_UserOfflineSmall Offline

Thank you, piajola. It does help me a lot!

This is also useful: javascript obfuscator

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