Garmin Health API Data - Daily Summary


This Guide will help you setup the Garmin Account to start collecting Garmin Health summary data and retrieve the data from the mEMA Website.


Setup Garmin Companion


In order to be able to see Garmin Data summary, first you need to follow the steps bellow in order connect mEMA participant account with a Garmin account.


  • Step 1: Create participant account
    • Before you begin, make sure you have a mobile code created for your participant
  • Step 2: Register with Garmin Companion
    • Go to "My mEMA" dropdown menu
    • Select "Garmin Companion Registration"

  • Step 3: Input Mobile Code
    • Enter the mobile code for the participant. (This has to be done one participant/mobile code at a time)
    • Click on "Submit" button
    • You will be redirect to the Garmin Website
  • Step 4: Garmin Connect Login
    • On the Garmin website, input the participant's Garmin Connect login credentials. (if they have not created their credentials, follow Steps 5 and 6)
  • Step 5: Create a Free Garmin Account (if necessary)
    • Participants can use a temporary email generator website to create a temporary email address. This website is a good option for this: https://temp-mail.org/en/
    • Use this email to create a free Garmin account on the Garmin Connect app.
  • Step 6: Link Mobile Code to Garmin Connect App
    • Ensure the participant has created their free account on the Garmin Connect app on their phone.
    • Once done, input their credentials on the Garmin Connect website to link their mobile code to the app.
    • Connect your Garmin Device with the Garmin Connect app and finish the Onboarding process



IMPORTANT NOTE!

  • If on Step 3 you are not presented with the Login Form, then you must stop the process, go to Garmin Connect website and log out from the account you're currently logged in. If you continue the process then you might end up linking multiple participant accounts (mobile codes) with the same Garmin account, which will cause for misleading data.


Retrieve Daily Summary data


After you finished connecting the mEMA participant account (Mobile code) with Garmin Connect you can go on the Garmin Health API Data page on the mEMA website and download the Daily Summary data for your participant.


Steps:

1. Under "My mEMA" dropdown Select Garmin Health API Data

2. From the "Type of Data" dropdown select "Daily Summary"

3. From the list of participants select the participant(s) you wish to view the Daily Summary data

  • By Default all available mobile codes will be selected
  • Mobile codes that are Grayed out are not connected through the Garmin Companion Registration therefore there's no data to be retrieved from them

4. Input your Date Range

5. Click on Generate Report

6. If there's data available a CSV file will be generated and will be available to be downloaded


In the CSV file, for each participant, the latest uploaded/retrieved data will be highlighted in yellow.


Each Daily Summary may contain the following information:


Property
Type
Description
Respondent ID
IntegermEMA participant ID
Mobile CodeIntegermEMA participant Mobile Code
calendarDate
string
The calendar date this summary would be displayed on in Garmin Connect. The date format is ‘yyyy-mmdd’.
summaryId
string
Unique identifier for the summary.
activeTimeInSeconds
IntegerPortion of the monitoring period (in seconds) in which the device wearer was considered Active. This relies on heuristics internal to each device.
activeKilocalories
integer
Active kilocalories (dietary calories) burned during the monitoring period. This includes only the calories burned by the activity and not calories burned as part of the basal metabolic rate (BMR).
bmrKilocalories
integerBMR Kilocalories burned by existing Basal Metabolic Rate (calculated based on user height/weight/age/other demographic data).
distanceInMeters
floating pointDistance traveled in meters.
durationInSeconds
integerLength of the monitoring period in seconds. 86400 once a full day is complete, but less if a user syncs mid-day.
startTime
stringStart time of the activity displayed as Date and time.
startTimeInSeconds
integerStart time of the activity in seconds since January 1, 1970, 00:00:00 UTC (Unix timestamp).
startTimeOffsetInSeconds
integerOffset in seconds to add to startTimeInSeconds to derive the “local” time of the device that captured the data.
moderateIntensityDurationInSeconds
integerCumulative duration of activities of moderate intensity. Moderate intensity is defined as activity with MET value range 3-6.
vigorousIntensityDurationInSeconds
integerCumulative duration of activities of vigorous intensity. Vigorous intensity is defined as activity with MET value > 6.
intensityDurationGoalInSeconds
integerThe user’s goal for consecutive seconds of moderate to vigorous intensity activity for this monitoring period.
floorsClimbed
integerNumber of floors climbed during the monitoring period.
floorsClimbedGoal
integerThe user’s goal for floors climbed in this monitoring period.
steps
integer
Count of steps recorded during the monitoring period.
stepsGoal
integerThe user’s steps goal for this monitoring period.
averageStressLevel
integerAn abstraction of the user’s average stress level in this monitoring period, measured from 1 to 100, or -1 if there is not enough data to calculate average stress. Scores between 1 and 25 are considered “rest” (i.e not stressful), 26-50 as “low” stress, 51-75 “medium” stress, and 76-100 as “high” stress.
maxStressLevel
integer
The highest stress level measurement taken during this monitoring period
stressDurationInSeconds
integerThe number of seconds in this monitoring period where stress level measurements were in the stressful range (26-100).
restStressDurationInSeconds
integerThe number of seconds in this monitoring period where stress level measurements were in the restful range (1 to 25).
activityStressDurationInSeconds
integerThe number of seconds in this monitoring period where the user was engaging in physical activity and so stress measurement was unreliable. All duration in this monitoring period not covered by stress, rest, and activity stress should be considered Uncategorized, either because the device was not worn or because not enough data could be taken to generate a stress score.
lowStressDurationInSeconds
integer
The portion of the user’s stress duration where the measured stress score was in the low range (26-50).
mediumStressDurationInSeconds
integerThe portion of the user’s stress duration where the measured stress score was in the medium range (51- 75).
highStressDurationInSeconds
integerThe portion of the user’s stress duration where the measured stress score was in the high range (76-100).
stressQualifier
stringA qualitative label applied based on all stress measurements in this monitoring period. Possible values: unknown, calm, balanced, stressful, very_stressful, calm_awake, balanced_awake, stressful_awake, very_stressful_awake. This matches what the user will see in Garmin Connect. It is recommended that implementations that use the stressQualifier be tolerant of unknown values in case more granular values are added.
minHeartRateInBeatsPerMinute
integerMinimum of heart rate values captured during the monitoring period, in beats per minute.
maxHeartRateInBeatsPerMinute
integerMaximum of heart rate values captured during the monitoring period, in beats per minute.
averageHeartRateInBeatsPerMinute
integerAverage of heart rate values captured during the last 7 days, in beats per minute. The average heart rate value for the monitoring period can be calculated based on the data from timeOffsetHeartRateSamples.
restingHeartRateInBeatsPerMinuteintegerAverage heart rate at rest during the monitoring period, in beats per minute
FINAL
IntegerRepresents if the current row contains the final data of the day or not.
Values are 0 - if not final, or 1 - if it's final.
Note that this value is subject to change if new data for the current day is added.