Can I export Connect HR data for external analysis & display?
Can I export Connect HR data for external analysis & display?
You can get JSON from Reports using F12 -> Network and changing start/end dates. Check other pages, the same way, if you need other data.
Like in this thread: Health and wellnes data in excel format…
I get 282 requests for the page - I don't know what you mean by "click on the chart for 7 days".
You can open F12 after loading a report for first time or clear the log using…
If there is no range, then one day is still good enough, you can make a script with loop and print needed data and save log or download those files and join in other program.
For example, this download…
You can get JSON from Reports using F12 -> Network and changing start/end dates. Check other pages, the same way, if you need other data.
Like in this thread: Health and wellnes data in excel format (PERSONAL STATISTICS).
Very interesting. Good reference & Info - thanks.
I get 282 requests for the page - I don't know what you mean by "click on the chart for 7 days".
There are several "interesting" URLS there, but not clear which one(s) have actual HR data.
Several with from-to dates, and different metrics.
I found this entry:
Which does show all the HR data for one day, (Yea!) and so then I edited it to:
... ?fromdate=2021-05-29?untildate=2021-05-30
but it gives a Response:
message: WellnessServiceManager:1276,WellnessServiceDefaultImpl:486
" error: Null pointer Exception."
Sure be nice if Garmin would make this easier - i.e. support it.
I get 282 requests for the page - I don't know what you mean by "click on the chart for 7 days".
You can open F12 after loading a report for first time or clear the log using trash-bin icon. Then, if you click on a time range like "7 days" (button on the webpage) for opened chart, then the log will show only that request.
But only some pages allow changing time range, so yes, not every link can found like that. If there is no clickable range on some page - then log all requests and sort by type, and look for JSON.
And yes, not all links accept time ranges, so you would need to look for one which do, or download data partially. There is quite a lot services for the same thing with different structure on different subpages, so it's just matter of searching a good one for needed data.
Thanks. Yes, appears that there are ranged API queries for many things ( https://connect.garmin.com/modern/proxy/userstats-service/statistics/availability//myname..)
but not for daily heart-rate. They do have {max, min, average, resting, etc}. as statistics, but I don's see any actual raw data. I asked their support - maybe there is an API for it.
If there is no range, then one day is still good enough, you can make a script with loop and print needed data and save log or download those files and join in other program.
For example, this download file for one day from console (tested in Firefox):
date = '2021-05-30'; jQuery.getJSON( 'https://connect.garmin.com/modern/proxy/wellness-service/wellness/dailyHeartRate/USER-NAME?date=' + date, function(d) { a = document.createElement('a'); a.download = d.calendarDate + '.json'; a.href = window.URL.createObjectURL(new Blob([JSON.stringify(d)])); a.click(); } );
Neat! Many thanks.
I'll look into how to make into a loop - (not familiar with JavaScript!).
I did ask their developer group how to do this from their API, and they replied that it is not available with a date range, and they will not permit any data access unless you are from an approved Health Data organization. and "sorry".