Segmenting a long time period into small monthly or weekly block for http get requests
1 view (last 30 days)
Show older comments
Hi
I have sensor data which i need to download from my API. The amount of data is fairly large as there a sample for every minute and i am downloading several months of data. My API and table storage is on Azure platform, and one of the limitation is that if a HTTP get request takes longer then 230 seconds, it will terminate that request and my request is taking longer then 230 seconds due to large amount of data.
This is my code;
live_data_start_timestamp='2022-09-06T13:00:00Z';
live_data_end_timestamp= '2022-11-07T23:59:00Z';
live_data_downloaded_data =device_data(deviceid,live_data_start_timestamp,live_data_end_timestamp);%g
As you can see my time period is over 2 months.
Is it possible to that i can generate multiple time start and stop time stamps, based on the specified duration where each new duration could be a maybe 1 or 2 weeks , so that when i call device_data, it does not take as long for output the request?
Is it possible to also call multple http get request at the same time on Matlab?
0 Comments
Answers (1)
Alvaro
on 27 Jan 2023
You should be able to generate sequences of time intervals with datetime:
I am not sure how multiple requests are processed but you can use the KeepAliveTimeout option in HTTPOptions to keep the server connection open (which seems to suggest that messages are processed one after the other).
0 Comments
See Also
Categories
Find more on Web Services in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!