0

Clear all data points in a feed?
Moderators: adafruit_support_bill, adafruit

Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
Please be positive and constructive with your questions and comments.

Clear all data points in a feed?

by breckymorris on Mon May 11, 2020 5:25 pm

I've seen a number of posts inquiring about removing all data from a feed but keeping the feed, but I've never seen it answered. Is there a way to do it via GUI or from a command line (via curl, for example)?

It comes up frequently for me - like I make a change to the program and then I have all this stale data and the plot scale is goofy or I move the sensor from testing into 'production' and the same thing happens. Removing the entire feed and recreating it isn't convenient.

Thanks,

Brecky

breckymorris
 
Posts: 6
Joined: Wed Feb 06, 2019 11:25 pm

Re: Clear all data points in a feed?

by brubell on Tue May 12, 2020 10:32 am

Hi Brecky,

There's no way to remove all data from a feed at once. Feed deletion is an API action (https://io.adafruit.com/api/docs/#delete-data-point) and is therefore limited to your account's data rate (30 or 60 data points per minute for IO Free and IO Plus, respectively).

You may want to create a script which uses the delete data point api endpoint (https://io.adafruit.com/api/docs/#delete-data-point) to remove data.

I'll put a feature request in for the devs., it's something I'd like to see too.

- Brent R.

brubell
 
Posts: 1256
Joined: Fri Jul 17, 2015 10:33 pm

Re: Clear all data points in a feed?

by alanspearson on Sat Feb 06, 2021 5:44 pm

I'd love to have this feature too. I have a feed in which the sensor was not correctly connected for a while and it now has a bunch of invalid data. It is throwing off the charts now, and I'd like to just reset the feed to empty. I could delete the feed but I guess it would probably remove it from my dashboards.

alanspearson
 
Posts: 1
Joined: Sat Feb 06, 2021 5:41 pm

Re: Clear all data points in a feed?

by stanrock on Fri Feb 12, 2021 10:16 am

Found a workaround for clearing all data from a feed. Go to your feeds and delete all of them related to your sketch. Wait for your update period and magically, your feeds will re-appear!

From what I have observed, there is no need to re-create your feeds, them seem to be in the system even after you delete them.

stanrock
 
Posts: 12
Joined: Sun Jul 30, 2017 6:00 pm

Re: Clear all data points in a feed?

by brubell on Fri Feb 12, 2021 10:50 am

stanrock wrote:Found a workaround for clearing all data from a feed. Go to your feeds and delete all of them related to your sketch. Wait for your update period and magically, your feeds will re-appear!

From what I have observed, there is no need to re-create your feeds, them seem to be in the system even after you delete them.

The Adafruit IO Arduino library can programmatically create feeds from your sketch, if they do not already exist on your IO account.

brubell
 
Posts: 1256
Joined: Fri Jul 17, 2015 10:33 pm

Re: Clear all data points in a feed?

by stanrock on Fri Feb 19, 2021 5:12 pm

Thats a sweet feature! Gotta love Adafruit.

stanrock
 
Posts: 12
Joined: Sun Jul 30, 2017 6:00 pm

Please be positive and constructive with your questions and comments.