ThingSpeak: How to set 'NumPoints' equal to the maximum available in the channel?

5 views (last 30 days)
Luke Martin
Luke Martin on 16 Nov 2021
Commented: Luke Martin on 17 Nov 2021
Hi folks,
I'm looking for a way to set the '2733' in my command below equal to the amount of datapoints available.
[data, time] = thingSpeakRead(readChannelID, 'Field', fieldID1, 'NumPoints', 2733, 'ReadKey', readAPIKey);
For context, I'm trying to setup visualisations that still work when the dataset in the channel is changed. For my current dataset, I have 2733 lines so the above works, but I'd like to get it to the point where it can work without amendment when I change the dataset.

Accepted Answer

Vinod on 16 Nov 2021
See this documentation. The NumPoints can be at max 8000. If you have less than 8000 points in your channel, everything is returned. If you have >8000 points, only the most recent 8000 are returned.
I'd recommend also answering this survey from the developers as they are looking to provide functionality based on use cases.

More Answers (0)


More Answers in the  ThingSpeak Community

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!