0

feed_id number in data download
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

feed_id number in data download

by colemanjj on Tue Sep 11, 2018 10:34 pm

When I download all my data feeds I get a .zip file with all the feeds identified by name and a feed_id number. Since I have redundant feed names, I need to use the feed ID number to figure out which device the data is coming from. Below are a few lines from one of the data feed downloads.

id,value,feed_id,created_at,lat,lon,ele
0DYFAYXPCQW0HQ9J5SD2R4XRP5,66.778053,780394,2018-08-12 16:35:41 UTC,39.19735,-79.6078,1750.0
0DYFB75JXQ308NNY1VVEB69VNT,59.165661,780394,2018-08-12 16:50:06 UTC,39.19735,-79.6078,1750.0
0DYFBQFHXX8Y53PGGSGR4QSCA1,70.475807,780394,2018-08-12 17:18:36 UTC,39.19735,-79.6078,1750.0

In the above data the feed_id appears to be 780394
Where do I find which feed at io.adafruit a Feed ID number refers to?
Probably obvious, but I can't find feed ID numbers anywhere in the io.adafruit web interface.
thanks,
john

colemanjj
 
Posts: 14
Joined: Fri Mar 09, 2018 9:10 pm

Re: feed_id number in data download

by mica_ia on Wed Sep 12, 2018 5:10 pm

hi colemanjj,


We use those feed ID values internally as an invariant identifier for feeds. Since multiple people can each have multiple feeds with the same name and key and the names and keys can change, we use a value that's set once and never changes to store relationship information.

It's not really obvious how to back track from numeric ID to actual record since we strongly encourage the use of keys in all our APIs and the web interface and there are a few spots (like this one) where they still show up.

You can use the getFeed API with the feed_id values to load information about feeds. With curl. For example, that might look like:
Code: Select all | TOGGLE FULL SIZE
curl -H "X-AIO-Key: $YOUR_IO_KEY" https://io.adafruit.com/api/v2/colemanjj/feeds/780394

Where $YOUR_IO_KEY is your IO key and colemanjj is whatever your username is on IO. That request will give you back a JSON record with the feed key, name, and description so you can sort things out.

Additionally, we've pushed a few updates today to help with this problem. First, you should now be able to use the feed_id values in URLs to browse around. For example, https://io.adafruit.com/colemanjj/feeds/780394 should be a legit URL for you now (if colemanjj is your username on IO, too). We also added detailed JSON records in group and feed info forms so you can see which feeds have which numeric IDs. Not quick to browse through every feed, but the info is findable.

Lastly, we added feeds, groups, and group_feeds (feed <-> group membership info) CSV files to the account download .zip. Those files include details on your feeds (including numeric ID values), groups, and a relationship table showing which feeds are in which groups. That hopefully means the next time you do an account backup you will get enough data to disambiguate without having to go back to the web.

Thanks for the question!


- adam b.

mica_ia
 
Posts: 1
Joined: Wed Sep 12, 2018 10:27 am

Re: feed_id number in data download

by abachman on Wed Sep 12, 2018 5:15 pm

^--- the above post constitutes an official response from The Adafruit IO Team™

forgot I was signed in to my demo / test account :P


- adam b.

abachman
 
Posts: 338
Joined: Mon Feb 01, 2010 12:48 pm

Re: feed_id number in data download

by colemanjj on Thu Sep 13, 2018 11:12 am

Wow, that was the most complete, fastest, and most useful response to an inquiry I've every gotten on a web forum.
thanks, john
p.s. I just did a download and the new information in the zip file solves the problem for me.

colemanjj
 
Posts: 14
Joined: Fri Mar 09, 2018 9:10 pm

Re: feed_id number in data download

by chuck.untulis on Sun Jul 28, 2019 9:37 pm

1) This information was very useful, but I am still missing a couple of things.

When I was looking for the feed ID, one of the links was "https://io.adafruit.com/api/v2/chuck.untulis/feeds/temperature" but when I replaced temperature with the feed id, I get the following error message - {"error":"not found - You are not permitted to access the feed with key 'temperature' belonging to chuck.untulis or the feed does not exist."}. It knows that the feed id I provided is associated with the feed named temperature but does not complete the mapping.

I can successfully use the "https://io.adafruit.com/chuck.untulis/feeds/temperature" replacing temperature by the feed id,

What do I need to know and/or do to get the API data?

2) When I selected the "Download" button for the feed, it says it completed, but I do not know where it put the data. There is a armed "Link" word next to the completion message but when I click it, I get the error message -

This XML file does not appear to have any style information associated with it. The document tree is shown below.
<Error>
<Code>AccessDenied</Code>
<Message>Request has expired</Message>
<X-Amz-Expires>65</X-Amz-Expires>
<Expires>2019-07-29T01:25:49Z</Expires>
<ServerTime>2019-07-29T01:25:55Z</ServerTime>
<RequestId>42B01DB77FA6E9C8</RequestId>
<HostId>
YHE+gPa7PYPL/aUOUsxst3C5W1cmc+6vfP5XSIgTZtjWKfzRGYFYORylaFGgYg+ZMewYNvC/64c=
</HostId>
</Error>

What do I need to do to download the data and how do I find out where it downloaded it?

Thanks

Chuck
chuck.untulis
 
Posts: 70
Joined: Mon Jun 20, 2011 11:54 pm

Re: feed_id number in data download

by chuck.untulis on Sun Jul 28, 2019 10:00 pm

I figured out item 2 after poking around but it was not obvious because the "Link" and the "Click to refresh" message are separated. I would suggest that the note should read

If the Link fails, then click to refresh because the links are only good for one minute.

This compresses four separate actions into one statement and one action -
. the asterisk that the user has to notice
. then they have to go down and read the expiration statement
. then they have to notice the "Click to refresh Link" link to refresh the link
. they have to go back and click the "Link".

If they click the "Click to refresh Link", then it should refresh the link and provide the information that clicking the link would have provided.

Ideally the Link would never go stale so this whole dialog would be eliminated and the Link would be refreshed and the destination download dialog would be popped up.

Chuck
chuck.untulis
 
Posts: 70
Joined: Mon Jun 20, 2011 11:54 pm

Please be positive and constructive with your questions and comments.