Getting raw metrics
GET /v2/raw-metrics/{metric}
metric is one of
- activity
- rr-interval
- sleep
- temperature
- heart-rate-variability
- ppg1
- ppg2
- bioz
- acc
- ecg
You must provide parameters from_date (String) and to_date (String) - Dates including timezone.
Example of from_date: 2022-11-22T00:12:03.000+01:00
Or alternatively you can provide from_client_date (String) and to_client_date (String).
Example of from_client_date: 2022-11-24T00:00:00.000
Please use from_client_date and to_client_date if you want to retrieve data in the local time of the user. This is helpful if you need to get the data for example for the day in the user's timezone. For example with range from_client_date=2022-11-24T00:00:00.000 - from_client_date=2022-11-24T23:59:59.999 you will get data from midnight to midnight in user's timezone.
And use from_date and to_date if you want to have absolute time. This is helpful when you have some data in other resources and you want to combine your data with Corsano data.
Please note that you can provide either pair from_date-to_date or from_client_date-to_client_date. Otherwise you will get HTTP 400 Error.
Also take into account that for different types of metrics you may request data for a limited time range. In the table below you may check the maximum difference between from and to dates.
No | Metric | Maximum Requested Interval |
---|---|---|
1 | activity | 24 hours |
2 | rr-interval | 24 hours |
3 | sleep | 24 hours |
4 | temperature | 24 hours |
5 | heart-rate-variability | 24 hours |
6 | ppg1 | 30 minutes |
7 | ppg2 | 3 minutes |
8 | bioz | 30 minutes |
9 | acc | 30 minutes |
10 | ecg | 30 minutes |
If you have any questions please contact sabir@corsano.com