APIs to access advanced metric history/averages

Former Member
Former Member
So I've been researching the developer docs a bit, in the hopes of putting together my first widget and watch face, and it seems that there's a limitation in the type of data the API can extract.

Here's what I had in mind to build: a widget that shows 7 days averages of basic metrics like daily steps, active minutes, resting heart rate, etc. Kinda like the "Last 7 days" summary on the Garmin Connect app, but as a widget directly on the watch.

I'm looking in particular to ActivityMonitor.getHistory/getHeartRateHistory, but it seems that only data pertaining the current day is available, or in the case of the heart rate the last 4 hours. Am I correct in thinking that what I want to build is impossible with the current SDK? And if the answer is affirmative, and someone from Garmin happens to read this, any chance we could see this functionality in the future? I understand there are in-device limitations, but perhaps the watch could talk with the Garmin Connect App for data that cannot be stored in the device directly.
  • There's a bunch of stuff available directly, like the things in ActivityMonitor (Info, History and getHeartRateHistory) and in SensorHistory (getXYZHistory). There's other things that might not be as obvious (I'm thinking Activity.Info and things like currentHeartRate (1hz HR on a Watchface), altitude, currentLocation - currentLocation doesn't update outside of a GPS activity, but is useful for things like sunrise/sunset calculation). BTW, currentHeartrate isn't a day. Just the last few hours

    There's things that can be calculated based on what is directly available (such as sunrise/set), and some things you can generate yourself (an example here is using a background process to collect 24 hrs or more worth of data for something like pressure, elevation, temperature, heart rate.)

    And yes, there are things not available in the API. Common ones that have been requested have been details on the last activity, or the last week of activities, the next alarm time, recovery time, etc.

    Look around the app store to see what's available in various apps (and this can vary by app type). You may not see a single app that does everything, but you can see what's possible overall. I have WFs with about 30 options for a data field for example, but others have more or different options.
  • Former Member
    Former Member
    It seems like all ideas I have on what to built rely on data that is not available yet in the API. I've just noticed that the "stress level" is also not accessible yet, that's a bummer, it would allow for some interesting things with watch faces and widgets. I get that the feature is relatively new, but still.

    Anyway, here's to hope Garmin keeps updating its SDK and API. I feel like there's still a lot of untapped potential for advanced apps/widgets/watch faces and as a fellow dev I'd be happy to advance what Garmin devices can do, given the chance.