Skip to main content

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.

NoMetricMaximum Requested Interval
1activity24 hours
2rr-interval24 hours
3sleep24 hours
4temperature24 hours
5heart-rate-variability24 hours
6ppg130 minutes
7ppg23 minutes
8bioz30 minutes
9acc30 minutes
10ecg30 minutes

If you have any questions please contact sabir@corsano.com