Hi. I am working on a CheerLights feed that is native to Adafruit IO. I am having trouble with one of the API endpoints from the documentation "data/last"
Here's my public feed: https://io.adafruit.com/api/v2/cheerlig ... /data/last
Without the last endpoint, the feed returns. Does anyone know what might be wrong? Only supports numerical last?
Thanks for the help.
Getting the last data 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.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
- jwcooper
- Posts: 1004
- Joined: Tue May 01, 2012 9:08 pm
Re: Getting the last data feed
The 'last' call is a write mode method that will read the last read value of the feed (it works in conjunction with 'first', 'next', 'previous'). That's the reason it won't work on a public feed. Only read-only methods work on public feeds.
I'd like to change that to work with public feeds (particularly 'last'), but in the meantime, you could use the 'retain', if csv is ok:
https://io.adafruit.com/api/v2/cheerlig ... ata/retain
I'd like to change that to work with public feeds (particularly 'last'), but in the meantime, you could use the 'retain', if csv is ok:
https://io.adafruit.com/api/v2/cheerlig ... ata/retain
- cheerlights
- Posts: 2
- Joined: Tue Nov 09, 2021 4:11 pm
Re: Getting the last data feed
Thanks. That is suitable for now. I +1 the idea to have those data endpoints map to public feeds.
Forum rules
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.
If you're posting code, please make sure your code does not include your Adafruit IO Active Key or WiFi network credentials.