GroveStreams

GET Request to get data from all streams and components533

giorgos private msg quote post Address this user
I am trying to retrive the history of data from startDate to endDate for all components and streams.

I tested with http://grovestreams.com/api/feed?startDate=1613070574000&endDate=1614170574000&api_key= xxxxx

which is based on the instructions and no data are retrieved.

Can you please help me? Do i have to provide the item IDs for all components and streams available?
Post 1 IP   flag post
MikeMills private msg quote post Address this user
Try doing this:

* Get a list of all components. See GET Component: https://www.grovestreams.com/developers/apicomp.html

* Loop over components and get all the meta data for each component stream. The meta data will include the startDate and endDate of each stream. See Get Component/{uid}?forQuickView. Set the startDate and endDate both to zero to prevent bringing back samples: https://www.grovestreams.com/developers/apicomp.html

* Now loop over each stream and make a batch stream call to get all of the samples. Include the UIDs or IDs and the proper dates in the call. See https://www.grovestreams.com/developers/apibatchfeed.html#ag1


You could simplify this by setting the startDate to the MIN_LONG time and setting the endDate to the MAX_LONG java amounts if all of your streams are Regular streams in step 2. This will not work for Interval streams.
Post 2 IP   flag post
3006 2 2
Log in or sign up to compose a reply.