JayantWexoz
What data do you need?
Intervals or messages by intervals?
If you want to get intervals for a specified period, you should send begin/end parameters with unix timestamp:
curl -X GET --header 'Accept: application/json' --header 'Authorization: FlespiToken YourToken' 'https://flespi.io/gw/calcs/all/devices/all/intervals/all?data=%7B%22begin%22%3A1568677065%2C%22end%22%3A1568718934%7D'
To get messages for the interval you should:
1) get intervals (https://flespi.io/docs/#/gw/!/calculators/get_calcs_calcs_selector_devices_calc_devices_selector_intervals_calc_device_intervals_selector)
2) get begin and end fields from interval
3) request messages with "from" (interval begin field) and "to" (interval end field) parameters
(https://flespi.io/docs/#/gw/!/devices/get_devices_dev_selector_messages)
curl -X GET --header 'Accept: application/json' --header 'Authorization: FlespiToken YourToken' 'https://flespi.io/gw/devices/all/messages?data=%7B%22count%22%3A10000000%2C%22from%22%3A1568677065%2C%22method%22%3A%22average%22%2C%22to%22%3A1568718934%7D'