Skip to content

Health data

Health data is available on both iOS via Health Kit and Android via the Google Fitness API. The configuration will map from the health metrics to trackers.

Unique data entries will be made for each metric and date. If run more than once subsequent runs will overwrite the data for the same days.

Example configuration

{
  "component": "grid",
  "direction": "row",
  "justifyContent": "start",
  "alignItems": "center",
  "classes": {
    "root": "tile"
  },
  "description": "Apple Health Kit",
  "onClick": {
    "target": "healthkit",
    "options": {
      "key": "HealthKitSyncDate",
      "path": "integrations.healthKit",
      "query": [
        "heart_rate",
        "steps",
        "exercise_time",
        "sleep_awake",
        "sleep_rem",
        "sleep_in_bed",
        "sleep_deep"
      ],
      "trackers": {
        "steps": "hkSteps",
        "heart_rate": "hkHeartRate",
        "exercise_time": "hkExerciseTime",
        "sleep_rem": "hkSleepRem",
        "sleep_awake": "hkSleepAwake",
        "sleep_in_bed": "hkSleepInBed",
        "sleep_deep": "hkSleepDeep"
      },
      "span": {
        "from": "2023-09-30",
        "to": "yesterday"
      }
    }
  }
}

iOS available metrics

  • active_energy_burned
  • audiogram
  • basal_energy_burned
  • blood_glucose
  • blood_oxygen
  • blood_pressure_diastolic
  • blood_pressure_systolic
  • body_fat_percentage
  • body_mass_index
  • body_temperature
  • dietary_carbs_consumed
  • dietary_energy_consumed
  • dietary_fats_consumed
  • dietary_protein_consumed
  • electrodermal_activity
  • forced_expiratory_volume
  • heart_rate
  • heart_rate_variability_sdnn
  • height
  • high_heart_rate_event
  • irregular_heart_rate_event
  • low_heart_rate_event
  • resting_heart_rate
  • respiratory_rate
  • peripheral_perfusion_index
  • steps
  • waist_circumference
  • walking_heart_rate
  • weight
  • flights_climbed
  • distance_walking_running
  • mindfulness
  • sleep_in_bed
  • sleep_awake
  • sleep_asleep
  • sleep_deep
  • sleep_rem
  • water
  • exercise_time
  • workout
  • headache_not_present
  • headache_mild
  • headache_moderate
  • headache_severe
  • headache_unspecified
  • electrocardiogram

Android available metrics

  • active_energy_burned
  • blood_glucose
  • blood_oxygen
  • blood_pressure_diastolic
  • blood_pressure_systolic
  • body_fat_percentage
  • body_mass_index
  • body_temperature
  • heart_rate
  • height
  • steps
  • weight
  • move_minutes
  • distance_delta
  • sleep_awake
  • sleep_asleep
  • sleep_deep
  • sleep_light
  • sleep_rem
  • sleep_out_of_bed
  • sleep_session
  • water
  • workout
  • resting_heart_rate
  • flights_climbed
  • basal_energy_burned
  • respiratory_rate

Data format

  • type
  • data: raw data values
    • val: value
    • from: start date time
    • to: end date time
    • src: source device friendly name
    • unit: unit of value, e.g. count, meters, minutes ..
    • type: type of value, e.g. steps, distance, duration ..
  • sources
    • deviceId: phone device id
    • platform: ios
    • sourceId: source device id
    • source: friendly name for the source device
    • type: the type id that was requested
    • unit: unit from the device
  • consolidated
    • min: min value
    • max: max value
    • mean: computed mean
    • median: computed median
    • sum: sum of values
    • count: count of values
    • unit: unit from the device
  • bySource
    • [sourceId] key for the entry
      • min: min value
      • max: max value
      • mean: computed mean
      • median: computed median
      • sum: sum of values
      • count: count of values
      • unit: unit from the device

Example data

Note that the data points have been truncated to two entries for brevity.

{
  "data": [
    {
      "val": "40.0",
      "from": "2023-10-08T23:57:14.637",
      "to": "2023-10-08T23:57:45.453",
      "src": "Mary’s Apple Watch",
      "unit": "count",
      "type": "steps"
    },
    {
      "val": "16.0",
      "from": "2023-10-08T23:45:16.335",
      "to": "2023-10-08T23:45:21.481",
      "src": "Mary’s iPhone",
      "unit": "count",
      "type": "steps"
    }
  ],
  "sources": [
    {
      "deviceId": "44993105-DF36-4073-B784-A258F5DE7B42",
      "platform": "ios",
      "sourceId": "com.apple.health.A41A4D74-D1B3-4088-8B4E-A37A7212F16C",
      "source": "Mary’s Apple Watch",
      "type": "steps",
      "unit": "count"
    },
    {
      "deviceId": "44993105-DF36-4073-B784-A258F5DE7B42",
      "platform": "ios",
      "sourceId": "com.apple.health.14DE714B-D1F1-4DBB-99F5-35787F49B64A",
      "source": "Mary’s iPhone",
      "type": "steps",
      "unit": "count"
    }
  ],
  "consolidated": {
    "mean": 285.3783783783784,
    "min": 6,
    "max": 886,
    "sum": 10559,
    "median": 118,
    "count": 37,
    "unit": "count"
  },
  "status": "valid",
  "bySource": {
    "com.apple.health.A41A4D74-D1B3-4088-8B4E-A37A7212F16C": {
      "mean": 205.57142857142858,
      "min": 6,
      "max": 858,
      "sum": 4317,
      "median": 94,
      "count": 21,
      "unit": "count",
      "source": "Mary’s Apple Watch"
    },
    "com.apple.health.14DE714B-D1F1-4DBB-99F5-35787F49B64A": {
      "mean": 390.125,
      "min": 8,
      "max": 886,
      "sum": 6242,
      "median": 384,
      "count": 16,
      "unit": "count",
      "source": "Mary’s iPhone"
    }
  },
  "type": "steps"
}