How to clear thingspeak channel from Matlab?

65 次查看(过去 30 天)
Good evening,
are there any MATLAB commands to clear a ThingSpeak channel?
I found this link but I can't use the commands:

回答(3 个)

Vinod
Vinod 2020-3-5
Try this:
ChannelID = YOUR_CHANNEL_NUMBER;
UserAPIKey = 'YOUR_USER_API_KEY'; % This is available from https://thingspeak.com/account/profile
url = sprintf('https://api.thingspeak.com/channels/%s/feeds.json?api_key=%s',num2str(ChannelID),UserAPIKey)
response = webwrite(url, weboptions('RequestMethod','delete'))
  1 个评论
Mirko Mirabella
Mirko Mirabella 2020-3-8
Thank you Vinod for the support, the Script that you send me work perfectly.
Now I can clear my ThingSpeak channels directly from MATLAB.
Thanks
Mirko

请先登录,再进行评论。


Larry Fostano
Larry Fostano 2020-11-3
I must be missing something here , how do I do that
  2 个评论
Christopher Stapels
编辑:Christopher Stapels 2021-2-22
You can use the script that Vinod posted in MATLAB analysis in ThingSpeak to programatically delete a channel.
Larry Fostano
Larry Fostano 2021-2-21
Ok I still don't see any script, how do I use a script that I don't have? Thank you

请先登录,再进行评论。


Larry Fostano
Larry Fostano 2021-2-21
If I copy the url it says this page isn't working, contact the site owner, thanks
https://api. thingspeak.com/channels/<channel_id>/feeds.<format>
  1 个评论
Christopher Stapels
Try this one and then modify it to have the channel values you need.
http://api.thingspeak.com/channels/1417/feeds.html

请先登录,再进行评论。

社区

更多回答在  ThingSpeak Community

类别

Help CenterFile Exchange 中查找有关 Read Data from Channel 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by