Retrieve first feed entry | ThingSpeak API | Forum

The ThingSpeak community site has been upgraded to a new site. This site is currently in read-only mode. You can ask questions or post and read discussions on the new site.
Avatar

Please consider registering
Guest

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 first feed entry
No permission to create posts
January 15, 2014
4:02 pm
Avatar
nr

Silver
Members
Forum Posts: 7
Member Since:
March 12, 2011
sp_UserOfflineSmall Offline

Is there an easy way to retrieve the very first entry in a channel feed?

I would want to use it together with the last entry to calculate the current operational lifetime of my device (defined simply as the time span between these two entries).

nr

January 16, 2014
12:51 pm
Avatar
lee

Admin
Forum Posts: 457
Member Since:
March 14, 2011
sp_UserOfflineSmall Offline

Hi,

Yes there is an undocumented feature that allows this, in the format /channels/CHANNEL_ID/feeds/entry/ENTRY_ID .

For example this is the first entry in Channel 9: http://api.thingspeak.com/channels/9/feeds/entry/1 , and this is the 99th entry: http://api.thingspeak.com/channels/9/feeds/entry/99 .

lee

January 16, 2014
3:41 pm
Avatar
nr

Silver
Members
Forum Posts: 7
Member Since:
March 12, 2011
sp_UserOfflineSmall Offline

Perfect!
Thanks a lot.

nr

January 26, 2014
8:59 pm
Avatar
turgo

Gold
Members
Forum Posts: 77
Member Since:
June 16, 2013
sp_UserOfflineSmall Offline

Is there a way to return a range of entries?

January 26, 2014
9:10 pm
Avatar
lee

Admin
Forum Posts: 457
Member Since:
March 14, 2011
sp_UserOfflineSmall Offline

Hi,

There is no way to return a range of entries based on entry IDs. The closest you can get is to get entries between start and end dates.

lee

Forum Timezone: America/New_York

Most Users Ever Online: 166

Currently Online:
32 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

rw950431: 272

Vinod: 240

piajola: 95

turgo: 70

vespapierre: 63

Adarsh_Murthy: 62

Member Stats:

Guest Posters: 1

Members: 8665

Moderators: 1

Admins: 2

Forum Stats:

Groups: 3

Forums: 14

Topics: 1600

Posts: 5760

Newest Members:

tran, huldacormier, bogart, estebanmateo93, mikewrite, onlinebusiness

Moderators: cstapels: 460

Administrators: Hans: 405, lee: 457