Mobile SDKs
Records
there are two types of data you can retrieve from spike records consist of the raw data points collected from user devices or applications statistics , on the other hand, are calculated values derived from records this page is dedicated to the records part it shows more in depth what lays unders records metric from the technical side interface spikerecord { recordid uuid; // record id inputmethod inputmethod | null; // how this record inputed startat string; // record start date and time endat string | null; // record end date and time modifiedat string; // time and date at which this record was modified duration number | null; // duration between startat and endat provider provider | null; // from which provider this information was collected providersource providersource | null; // provider source issourceaggregated boolean | null; source recordsource | null; metrics { \[key string] number } | null; activitytags activitytag\[] | null; activitytype activitytype | null; sessions activityentry\[] | null; laps activityentry\[] | null; segments activityentry\[] | null; splits activityentry\[] | null; samples activityentry\[] | null; routepoints activityentry\[] | null; sleep activityentry\[] | null; } type uuid = string; enum inputmethod { unknown = "unknown", manual = "manual", device = "device" } enum provider { // list of providers enums can be found below } export enum providersource { // list of provider source can be found below } interface recordsource { devicemanufacturer string | null; devicemodel string | null; deviceproduct string | null; deviceversion string | null; sourcebundleidentifier string | null; sourceosversion string | null; sourceproduct string | null; sourceversion string | null; } enum activitytag { // list of activity tags can be found below } enum activitytype { // list of activity types can be found below } interface activityentry { divisionref number | null; divisionlabel string | null; startat string | null; endat string | null; duration number | null; metrics { \[key string] number } | null; } provider enums enum provider { fitbit = "fitbit", oura = "oura", suunto = "suunto", garmin = "garmin", polar = "polar", whoop = "whoop", withings = "withings", wahoo = "wahoo", apple = "apple", healthconnect = "health connect", unknown = " unknown" } provider source enums export enum providersource { applehealthkitsample = "apple healthkit sample", applehealthkitstatistics = "apple healthkit statistics", applehealthkitactivity = "apple healthkit activity", applehealthkitsleepaggregation = "apple healthkit sleep aggregation", healthconnectrecord = "health connect record", healthconnectaggregation = "health connect aggregation", healthconnectactivity = "health connect activity", fitbituseractivitieslist = "fitbit user activities list", fitbituseractivitiesdate = "fitbit user activities date", fitbituseractivitiesheartdate = "fitbit user activities heart date", fitbituseractivitiesheartdateinterday = "fitbit user activities heart date interday", garminwellnessepochs = "garmin wellness epochs", garminwellnessdailies = "garmin wellness dailies", garminwellnessactivities = "garmin wellness activities", garminwellnessactivitydetails = "garmin wellness activity details", garminwellnessactivityfile = "garmin wellness activity file", ourausercollectiondailyactivitydocument = "oura user collection daily activity document", ourausercollectionsleepdocument = "oura user collection sleep document", ourausercollectionworkoutdocument = "oura user collection workout document", polarcontinuousheartrate = "polar continuous heart rate", polarexercise = "polar exercise", polarexercisefitfile = "polar exercise fit file", polarsleep = "polar sleep", polaractivitytransaction = "polar activity transaction", stravaactivity = "strava activity", suuntoworkoutsummary = "suunto workout summary", suuntoworkoutfitfile = "suunto workout fit file", suuntoactivitysamples = "suunto activity samples", whoopcycle = "whoop cycle", whoopcyclerecovery = "whoop cycle recovery", whoopactivitysleep = "whoop activity sleep", whoopactivityworkout = "whoop activity workout", withingssleepsummary = "withings sleep summary", withingssleepget = "withings sleep get", withingsmeasuregetworkouts = "withings measure get workouts", withingsmeasuregetactivity = "withings measure get activity", withingsmeasuregetmeas = "withings measure get meas", wahooworkoutsummary = "wahoo workout summary", unknown = " unknown" } activity tags enums enum activitytag { onfoot = "on foot", onbicycle = "on bicycle", walking = "walking", running = "running", cycling = "cycling", gym = "gym", swimming = "swimming", wintersports = "winter sports", watersports = "water sports", teamsports = "team sports", racketsports = "racket sports", individualsports = "individual sports", outdoorrecreation = "outdoor recreation", dancing = "dancing", martialarts = "martial arts", wheelchair = "wheelchair", climbing = "climbing", workout = "workout", sleep = "sleep", unknown = " unknown" activity type enums enum activitytype { other = "other", sedentary = "sedentary", aerobics = "aerobics", play = "play", housework = "house work", gardening = "gardening", sleep = "sleep", workout = "workout", running = "running", indoorrunning = "indoor running", obstaclerun = "obstacle run", streetrunning = "street running", trackrunning = "track running", trailrunning = "trail running", treadmillrunning = "treadmill running", ultrarunning = "ultra running", virtualrunning = "virtual running", cycling = "cycling", bmxcycling = "bmx cycling", cyclocrosscycling = "cyclocross cycling", downhillbiking = "downhill biking", ebikefitness = "e bike fitness", ebikemountain = "e bike mountain", gravelcycling = "gravel cycling", indoorcycling = "indoor cycling", mountainbiking = "mountain biking", recumbentcycling = "recumbent cycling", roadbiking = "road biking", trackcycling = "track cycling", virtualride = "virtual ride", handcycling = "hand cycling", indoorhandcycling = "indoor hand cycling", gym = "gym", bouldering = "bouldering", elliptical = "elliptical", indoorcardio = "indoor cardio", hiit = "hiit", indoorclimbing = "indoor climbing", indoorrowing = "indoor rowing", pilates = "pilates", stairclimbing = "stair climbing", strengthtraining = "strength training", yoga = "yoga", meditation = "meditation", ropeskipping = "rope skipping", gymnastics = "gymnastics", coretraining = "core training", mixedtraining = "mixed training", crossfit = "crossfit", warmup = "warm up", cooldown = "cool down", flexibilitytraining = "flexibility training", swimming = "swimming", openwaterswimming = "open water swimming", walking = "walking", casualwalking = "casual walking", speedwalking = "speed walking", hiking = "hiking", wintersports = "winter sports", backcountrysnowboarding = "backcountry snowboarding", backcountryskiing = "backcountry skiing", crosscountryclassicskiing = "cross country classic skiing", skiing = "skiing", snowboarding = "snowboarding", skiingsnowboarding = "skiing snowboarding", crosscountryskateskiing = "cross country skate skiing", skatingskiing = "skating skiing", snowshoeing = "snow shoeing", snowmobiling = "snowmobiling", curling = "curling", watersports = "water sports", boating = "boating", kayaking = "kayaking", kiteboarding = "kiteboarding", offshoregrinding = "offshore grinding", onshoregrinding = "onshore grinding", paddling = "paddling", rowing = "rowing", sailing = "sailing", snorkeling = "snorkeling", standuppaddleboarding = "stand up paddleboarding", surfing = "surfing", wakeboarding = "wakeboarding", waterskiing = "waterskiing", whitewaterrafting = "whitewater rafting", windsurfing = "windsurfing", teamsports = "team sports", americanfootball = "american football", baseball = "baseball", basketball = "basketball", cricket = "cricket", fieldhockey = "field hockey", icehockey = "ice hockey", lacrosse = "lacrosse", rugby = "rugby", soccer = "soccer", softball = "softball", disc = "disc", volleyball = "volleyball", australianfootball = "australian football", handball = "handball", waterpolo = "water polo", racketsports = "racket sports", badminton = "badminton", padel = "padel", pickleball = "pickleball", platformtennis = "platform tennis", racquetball = "racquetball", squash = "squash", tabletennis = "table tennis", tennis = "tennis", paddleball = "paddle ball", martialarts = "martial arts", boxing = "boxing", mixedmartialarts = "mixed martial arts", kickboxing = "kickboxing", muaythai = "muay thai", wrestling = "wrestling", judo = "judo", karate = "karate", taekwondo = "taekwondo", aikido = "aikido", capoeira = "capoeira", kungfu = "kung fu", taichi = "tai chi", dancing = "dancing", barre = "barre", climbing = "climbing", wheelchairpushrun = "wheelchair push run", wheelchairpushwalk = "wheelchair push walk", archery = "archery", bowling = "bowling", fencing = "fencing", golf = "golf", equestrian = "equestrian", hunting = "hunting", fishing = "fishing", outdoorrecreation = "outdoor recreation", geocaching = "geocaching", unknown = " unknown" } response examples running and walking activities { "uid" "bf18c185 af8e 5952 b9c0 320da9afed83", "from" "2024 12 28t00 00 00+02 00", "to" "2024 12 29t00 00 00+02 00", "timezone" "europe/vilnius", "activities" \[ { "modified at" "2025 01 10t18 21 25+02 00", "expire at" "2025 12 28t13 47 43+02 00", "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t14 41 18+02 00", "duration" 3215000, "user time offset minutes" 120, "record id" "0134db4c 26e9 8cf2 8024 8670109c99ec", "provider slug" "apple", "provider source" "apple healthkit activity", "input method" "unknown", "source" { "device manufacturer" "apple inc ", "device model" "watch4,2", "device version" "10 6 1", "source version" "10 6 1", "source bundle identifier" "com apple health" }, "activity type" "running", "activity tags" \[ "running", "on foot", "workout" ], "metrics" { "heartrate max" 189, "heartrate avg" 163, "heartrate min" 105, "calories burned active" 413 4752, "calories burned basal" 68 2516, "steps" 7595, "distance" 7161 4502 }, "sessions" \[ { "duration" 473000, "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 55 36+02 00", "metrics" { "heartrate max" 169, "heartrate avg" 141, "heartrate min" 105, "calories burned active" 43 1318, "calories burned basal" 7 1304, "steps" 887, "distance" 807 6845 } }, { "duration" 116000, "start at" "2024 12 28t13 55 36+02 00", "end at" "2024 12 28t13 57 32+02 00", "metrics" { "heartrate max" 177, "heartrate avg" 173, "heartrate min" 169, "calories burned active" 22 0951, "calories burned basal" 2 5908, "steps" 358, "distance" 402 1347 } }, { "duration" 239000, "start at" "2024 12 28t13 57 32+02 00", "end at" "2024 12 28t14 01 31+02 00", "metrics" { "heartrate max" 177, "heartrate avg" 158, "heartrate min" 141, "calories burned active" 26 4177, "calories burned basal" 5 3399, "steps" 531, "distance" 457 0416 } }, { "duration" 114000, "start at" "2024 12 28t14 01 31+02 00", "end at" "2024 12 28t14 03 25+02 00", "metrics" { "heartrate max" 182, "heartrate avg" 174, "heartrate min" 163, "calories burned active" 21 7009, "calories burned basal" 2 5501, "steps" 355, "distance" 398 1409 } }, { "duration" 138000, "start at" "2024 12 28t14 03 25+02 00", "end at" "2024 12 28t14 05 43+02 00", "metrics" { "heartrate max" 182, "heartrate avg" 166, "heartrate min" 152, "calories burned active" 14 4087, "calories burned basal" 3 0675, "steps" 296, "distance" 260 4041 } }, { "duration" 106000, "start at" "2024 12 28t14 05 43+02 00", "end at" "2024 12 28t14 07 29+02 00", "metrics" { "heartrate max" 181, "heartrate avg" 168, "heartrate min" 150, "calories burned active" 22 8379, "calories burned basal" 2 3752, "steps" 336, "distance" 402 0674 } }, { "duration" 130000, "start at" "2024 12 28t14 07 29+02 00", "end at" "2024 12 28t14 09 39+02 00", "metrics" { "heartrate max" 181, "heartrate avg" 163, "heartrate min" 141, "calories burned active" 12 8599, "calories burned basal" 2 9037, "steps" 270, "distance" 219 9243 } }, { "duration" 108000, "start at" "2024 12 28t14 09 39+02 00", "end at" "2024 12 28t14 11 27+02 00", "metrics" { "heartrate max" 176, "heartrate avg" 164, "heartrate min" 143, "calories burned active" 22 3985, "calories burned basal" 2 4119, "steps" 336, "distance" 400 8946 } }, { "duration" 240000, "start at" "2024 12 28t14 11 27+02 00", "end at" "2024 12 28t14 15 27+02 00", "metrics" { "heartrate max" 178, "heartrate avg" 156, "heartrate min" 144, "calories burned active" 23 8854, "calories burned basal" 5 3468, "steps" 463, "distance" 383 1563 } }, { "duration" 119000, "start at" "2024 12 28t14 15 27+02 00", "end at" "2024 12 28t14 17 26+02 00", "metrics" { "heartrate max" 189, "heartrate avg" 176, "heartrate min" 145, "calories burned active" 26 6952, "calories burned basal" 2 6754, "steps" 363, "distance" 397 3856 } }, { "duration" 240000, "start at" "2024 12 28t14 17 26+02 00", "end at" "2024 12 28t14 21 26+02 00", "metrics" { "heartrate max" 186, "heartrate avg" 163, "heartrate min" 145, "calories burned active" 25 8430, "calories burned basal" 5 3386, "steps" 486, "distance" 402 7374 } }, { "duration" 136000, "start at" "2024 12 28t14 21 26+02 00", "end at" "2024 12 28t14 23 42+02 00", "metrics" { "heartrate max" 184, "heartrate avg" 173, "heartrate min" 146, "calories burned active" 24 5656, "calories burned basal" 3 0560, "steps" 419, "distance" 399 9601 } }, { "duration" 240000, "start at" "2024 12 28t14 23 42+02 00", "end at" "2024 12 28t14 27 42+02 00", "metrics" { "heartrate max" 183, "heartrate avg" 158, "heartrate min" 138, "calories burned active" 23 9336, "calories burned basal" 5 3414, "steps" 456, "distance" 384 0445 } }, { "duration" 123000, "start at" "2024 12 28t14 27 42+02 00", "end at" "2024 12 28t14 29 45+02 00", "metrics" { "heartrate max" 180, "heartrate avg" 166, "heartrate min" 138, "calories burned active" 21 6542, "calories burned basal" 2 7491, "steps" 380, "distance" 402 5365 } }, { "duration" 239000, "start at" "2024 12 28t14 29 45+02 00", "end at" "2024 12 28t14 33 44+02 00", "metrics" { "heartrate max" 182, "heartrate avg" 165, "heartrate min" 146, "calories burned active" 25 0104, "calories burned basal" 5 3518, "steps" 519, "distance" 433 1224 } }, { "duration" 128000, "start at" "2024 12 28t14 33 44+02 00", "end at" "2024 12 28t14 35 52+02 00", "metrics" { "heartrate max" 183, "heartrate avg" 170, "heartrate min" 146, "calories burned active" 22 2323, "calories burned basal" 2 8582, "steps" 392, "distance" 403 5492 } }, { "duration" 240000, "start at" "2024 12 28t14 35 52+02 00", "end at" "2024 12 28t14 39 52+02 00", "metrics" { "heartrate max" 185, "heartrate avg" 172, "heartrate min" 152, "calories burned active" 26 3337, "calories burned basal" 5 3418, "steps" 579, "distance" 463 9949 } }, { "duration" 86000, "start at" "2024 12 28t14 39 52+02 00", "end at" "2024 12 28t14 41 18+02 00", "metrics" { "heartrate max" 181, "heartrate avg" 163, "heartrate min" 148, "calories burned active" 7 4712, "calories burned basal" 1 8231, "steps" 170, "distance" 142 6711 } } ], "segments" \[ { "duration" 527738, "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 56 30 738+02 00" }, { "duration" 804889, "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t14 01 07 889+02 00" }, { "duration" 527738, "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 56 30 738+02 00" }, { "duration" 804889, "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t14 01 07 889+02 00" }, { "duration" 396079, "start at" "2024 12 28t13 56 31+02 00", "end at" "2024 12 28t14 03 07 079+02 00" }, { "duration" 804889, "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t14 01 07 889+02 00" }, { "duration" 396079, "start at" "2024 12 28t13 56 31+02 00", "end at" "2024 12 28t14 03 07 079+02 00" }, { "duration" 584017, "start at" "2024 12 28t14 01 08+02 00", "end at" "2024 12 28t14 10 52 017+02 00" }, { "duration" 396079, "start at" "2024 12 28t13 56 31+02 00", "end at" "2024 12 28t14 03 07 079+02 00" }, { "duration" 584017, "start at" "2024 12 28t14 01 08+02 00", "end at" "2024 12 28t14 10 52 017+02 00" }, { "duration" 409957, "start at" "2024 12 28t14 03 07+02 00", "end at" "2024 12 28t14 09 56 957+02 00" }, { "duration" 584017, "start at" "2024 12 28t14 01 08+02 00", "end at" "2024 12 28t14 10 52 017+02 00" }, { "duration" 409957, "start at" "2024 12 28t14 03 07+02 00", "end at" "2024 12 28t14 09 56 957+02 00" }, { "duration" 584017, "start at" "2024 12 28t14 01 08+02 00", "end at" "2024 12 28t14 10 52 017+02 00" }, { "duration" 409957, "start at" "2024 12 28t14 03 07+02 00", "end at" "2024 12 28t14 09 56 957+02 00" }, { "duration" 584017, "start at" "2024 12 28t14 01 08+02 00", "end at" "2024 12 28t14 10 52 017+02 00" }, { "duration" 409957, "start at" "2024 12 28t14 03 07+02 00", "end at" "2024 12 28t14 09 56 957+02 00" }, { "duration" 584017, "start at" "2024 12 28t14 01 08+02 00", "end at" "2024 12 28t14 10 52 017+02 00" }, { "duration" 409957, "start at" "2024 12 28t14 03 07+02 00", "end at" "2024 12 28t14 09 56 957+02 00" }, { "duration" 403684, "start at" "2024 12 28t14 09 57+02 00", "end at" "2024 12 28t14 16 40 684+02 00" }, { "duration" 732771, "start at" "2024 12 28t14 10 52+02 00", "end at" "2024 12 28t14 23 04 771+02 00" }, { "duration" 403684, "start at" "2024 12 28t14 09 57+02 00", "end at" "2024 12 28t14 16 40 684+02 00" }, { "duration" 732771, "start at" "2024 12 28t14 10 52+02 00", "end at" "2024 12 28t14 23 04 771+02 00" }, { "duration" 403684, "start at" "2024 12 28t14 09 57+02 00", "end at" "2024 12 28t14 16 40 684+02 00" }, { "duration" 732771, "start at" "2024 12 28t14 10 52+02 00", "end at" "2024 12 28t14 23 04 771+02 00" }, { "duration" 460109, "start at" "2024 12 28t14 16 41+02 00", "end at" "2024 12 28t14 24 21 109+02 00" }, { "duration" 732771, "start at" "2024 12 28t14 10 52+02 00", "end at" "2024 12 28t14 23 04 771+02 00" }, { "duration" 460109, "start at" "2024 12 28t14 16 41+02 00", "end at" "2024 12 28t14 24 21 109+02 00" }, { "duration" 732771, "start at" "2024 12 28t14 10 52+02 00", "end at" "2024 12 28t14 23 04 771+02 00" }, { "duration" 460109, "start at" "2024 12 28t14 16 41+02 00", "end at" "2024 12 28t14 24 21 109+02 00" }, { "duration" 729988, "start at" "2024 12 28t14 23 05+02 00", "end at" "2024 12 28t14 35 14 988+02 00" }, { "duration" 460109, "start at" "2024 12 28t14 16 41+02 00", "end at" "2024 12 28t14 24 21 109+02 00" }, { "duration" 729988, "start at" "2024 12 28t14 23 05+02 00", "end at" "2024 12 28t14 35 14 988+02 00" }, { "duration" 476362, "start at" "2024 12 28t14 24 21+02 00", "end at" "2024 12 28t14 32 17 362+02 00" }, { "duration" 729988, "start at" "2024 12 28t14 23 05+02 00", "end at" "2024 12 28t14 35 14 988+02 00" }, { "duration" 476362, "start at" "2024 12 28t14 24 21+02 00", "end at" "2024 12 28t14 32 17 362+02 00" }, { "duration" 729988, "start at" "2024 12 28t14 23 05+02 00", "end at" "2024 12 28t14 35 14 988+02 00" }, { "duration" 476362, "start at" "2024 12 28t14 24 21+02 00", "end at" "2024 12 28t14 32 17 362+02 00" }, { "duration" 445501, "start at" "2024 12 28t14 32 17+02 00", "end at" "2024 12 28t14 39 42 501+02 00" }, { "duration" 729988, "start at" "2024 12 28t14 23 05+02 00", "end at" "2024 12 28t14 35 14 988+02 00" }, { "duration" 445501, "start at" "2024 12 28t14 32 17+02 00", "end at" "2024 12 28t14 39 42 501+02 00" }, { "duration" 360908, "start at" "2024 12 28t14 35 15+02 00", "end at" "2024 12 28t14 41 15 908+02 00" }, { "duration" 445501, "start at" "2024 12 28t14 32 17+02 00", "end at" "2024 12 28t14 39 42 501+02 00" }, { "duration" 360908, "start at" "2024 12 28t14 35 15+02 00", "end at" "2024 12 28t14 41 15 908+02 00" }, { "duration" 93142, "start at" "2024 12 28t14 39 43+02 00", "end at" "2024 12 28t14 41 16 142+02 00" }, { "duration" 360908, "start at" "2024 12 28t14 35 15+02 00", "end at" "2024 12 28t14 41 15 908+02 00" }, { "duration" 93142, "start at" "2024 12 28t14 39 43+02 00", "end at" "2024 12 28t14 41 16 142+02 00" } ], "samples" \[ { "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 47 43+02 00", "metrics" { "calories burned basal" 68 5151 } }, { "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 47 43+02 00", "metrics" { "steps" 7595 } }, { "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 47 43+02 00", "metrics" { "heartrate max" 189, "heartrate avg" 163, "heartrate min" 105 } }, { "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 47 43+02 00", "metrics" { "distance" 7166 8858 } }, { "start at" "2024 12 28t13 47 43+02 00", "end at" "2024 12 28t13 47 43+02 00", "metrics" { "calories burned active" 414 3295 } } ] }, { "modified at" "2025 01 14t18 21 25+02 00", "expire at" "2025 12 28t15 00 46+02 00", "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 25 38+02 00", "duration" 1492000, "user time offset minutes" 120, "record id" "0134db4c bd0f 8f15 a70b e51a3d87638f", "provider slug" "apple", "provider source" "apple healthkit activity", "input method" "unknown", "source" { "device manufacturer" "apple inc ", "device model" "watch4,2", "device version" "10 6 1", "source version" "10 6 1", "source bundle identifier" "com apple health" }, "activity type" "walking", "activity tags" \[ "on foot", "walking", "workout" ], "metrics" { "heartrate max" 146, "heartrate avg" 126, "heartrate min" 109, "calories burned active" 112 0204, "calories burned basal" 33 2079, "distance" 2007 3128 }, "sessions" \[ { "duration" 1492000, "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 25 38+02 00", "metrics" { "heartrate max" 146, "heartrate avg" 126, "heartrate min" 109, "calories burned active" 112 0204, "calories burned basal" 33 2079, "distance" 2007 3128 } } ], "segments" \[ { "duration" 619147, "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 11 05 147+02 00" }, { "duration" 1157071, "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 20 03 071+02 00" }, { "duration" 861141, "start at" "2024 12 28t15 11 05+02 00", "end at" "2024 12 28t15 25 26 141+02 00" }, { "duration" 330438, "start at" "2024 12 28t15 20 03+02 00", "end at" "2024 12 28t15 25 33 438+02 00" }, { "duration" 7220, "start at" "2024 12 28t15 25 26+02 00", "end at" "2024 12 28t15 25 33 22+02 00" } ], "samples" \[ { "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 00 46+02 00", "metrics" { "calories burned active" 112 0451 } }, { "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 00 46+02 00", "metrics" { "heartrate max" 145, "heartrate avg" 125, "heartrate min" 109 } }, { "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 00 46+02 00", "metrics" { "distance" 2007 3128 } }, { "start at" "2024 12 28t15 00 46+02 00", "end at" "2024 12 28t15 00 46+02 00", "metrics" { "calories burned basal" 33 2310 } } ] } ] } sleep { "uid" "bf18c185 af8e 5952 b9c0 320da9afed83", "from" "2025 01 11t19 00 00+02 00", "to" "2025 01 12t13 00 00+02 00", "timezone" "europe/vilnius", "records" \[ { "modified at" "2025 01 14t18 25 58+02 00", "expire at" "2026 01 11t22 41 05+02 00", "start at" "2025 01 11t22 41 05+02 00", "end at" "2025 01 12t07 59 05+02 00", "duration" 33480000, "user time offset minutes" 120, "record id" "0134fdff 0a6d 8a47 aa30 06d572a32584", "provider slug" "apple", "provider source" "apple healthkit sleep aggregation", "input method" "device", "source" {}, "activity type" "sleep", "activity tags" \[ "sleep" ], "metrics" { "heartrate max" 115, "heartrate avg" 58, "heartrate min" 53 }, "sleep" \[ { "division ref" 4, "division label" "light", "duration" 3690000, "start at" "2025 01 11t22 41 05+02 00", "end at" "2025 01 11t23 42 35+02 00", "metrics" { "heartrate max" 61, "heartrate avg" 56, "heartrate min" 54 } }, { "division ref" 6, "division label" "rem", "duration" 330000, "start at" "2025 01 11t23 42 35+02 00", "end at" "2025 01 11t23 48 05+02 00", "metrics" { "heartrate max" 62, "heartrate avg" 62, "heartrate min" 62 } }, { "division ref" 1, "division label" "awake", "duration" 60000, "start at" "2025 01 11t23 48 05+02 00", "end at" "2025 01 11t23 49 05+02 00" }, { "division ref" 6, "division label" "rem", "duration" 180000, "start at" "2025 01 11t23 49 05+02 00", "end at" "2025 01 11t23 52 05+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 58, "heartrate min" 58 } }, { "division ref" 1, "division label" "awake", "duration" 2790000, "start at" "2025 01 11t23 52 05+02 00", "end at" "2025 01 12t00 38 35+02 00", "metrics" { "heartrate max" 115, "heartrate avg" 87, "heartrate min" 63 } }, { "division ref" 4, "division label" "light", "duration" 1080000, "start at" "2025 01 12t00 38 35+02 00", "end at" "2025 01 12t00 56 35+02 00", "metrics" { "heartrate max" 61, "heartrate avg" 60, "heartrate min" 60 } }, { "division ref" 1, "division label" "awake", "duration" 360000, "start at" "2025 01 12t00 56 35+02 00", "end at" "2025 01 12t01 02 35+02 00", "metrics" { "heartrate max" 60, "heartrate avg" 59, "heartrate min" 58 } }, { "division ref" 4, "division label" "light", "duration" 2250000, "start at" "2025 01 12t01 02 35+02 00", "end at" "2025 01 12t01 40 05+02 00", "metrics" { "heartrate max" 57, "heartrate avg" 55, "heartrate min" 54 } }, { "division ref" 6, "division label" "rem", "duration" 510000, "start at" "2025 01 12t01 40 05+02 00", "end at" "2025 01 12t01 48 35+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 58, "heartrate min" 58 } }, { "division ref" 1, "division label" "awake", "duration" 30000, "start at" "2025 01 12t01 48 35+02 00", "end at" "2025 01 12t01 49 05+02 00" }, { "division ref" 6, "division label" "rem", "duration" 630000, "start at" "2025 01 12t01 49 05+02 00", "end at" "2025 01 12t01 59 35+02 00", "metrics" { "heartrate max" 60, "heartrate avg" 58, "heartrate min" 57 } }, { "division ref" 1, "division label" "awake", "duration" 120000, "start at" "2025 01 12t01 59 35+02 00", "end at" "2025 01 12t02 01 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 180000, "start at" "2025 01 12t02 01 35+02 00", "end at" "2025 01 12t02 04 35+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 58, "heartrate min" 58 } }, { "division ref" 1, "division label" "awake", "duration" 150000, "start at" "2025 01 12t02 04 35+02 00", "end at" "2025 01 12t02 07 05+02 00" }, { "division ref" 4, "division label" "light", "duration" 210000, "start at" "2025 01 12t02 07 05+02 00", "end at" "2025 01 12t02 10 35+02 00", "metrics" { "heartrate max" 55, "heartrate avg" 55, "heartrate min" 55 } }, { "division ref" 1, "division label" "awake", "duration" 270000, "start at" "2025 01 12t02 10 35+02 00", "end at" "2025 01 12t02 15 05+02 00" }, { "division ref" 4, "division label" "light", "duration" 1380000, "start at" "2025 01 12t02 15 05+02 00", "end at" "2025 01 12t02 38 05+02 00", "metrics" { "heartrate max" 57, "heartrate avg" 55, "heartrate min" 54 } }, { "division ref" 5, "division label" "deep", "duration" 90000, "start at" "2025 01 12t02 38 05+02 00", "end at" "2025 01 12t02 39 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 150000, "start at" "2025 01 12t02 39 35+02 00", "end at" "2025 01 12t02 42 05+02 00" }, { "division ref" 1, "division label" "awake", "duration" 60000, "start at" "2025 01 12t02 42 05+02 00", "end at" "2025 01 12t02 43 05+02 00" }, { "division ref" 4, "division label" "light", "duration" 1290000, "start at" "2025 01 12t02 43 05+02 00", "end at" "2025 01 12t03 04 35+02 00", "metrics" { "heartrate max" 57, "heartrate avg" 55, "heartrate min" 54 } }, { "division ref" 5, "division label" "deep", "duration" 120000, "start at" "2025 01 12t03 04 35+02 00", "end at" "2025 01 12t03 06 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 900000, "start at" "2025 01 12t03 06 35+02 00", "end at" "2025 01 12t03 21 35+02 00", "metrics" { "heartrate max" 55, "heartrate avg" 55, "heartrate min" 54 } }, { "division ref" 6, "division label" "rem", "duration" 660000, "start at" "2025 01 12t03 21 35+02 00", "end at" "2025 01 12t03 32 35+02 00", "metrics" { "heartrate max" 62, "heartrate avg" 60, "heartrate min" 58 } }, { "division ref" 1, "division label" "awake", "duration" 60000, "start at" "2025 01 12t03 32 35+02 00", "end at" "2025 01 12t03 33 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 150000, "start at" "2025 01 12t03 33 35+02 00", "end at" "2025 01 12t03 36 05+02 00", "metrics" { "heartrate max" 57, "heartrate avg" 57, "heartrate min" 57 } }, { "division ref" 6, "division label" "rem", "duration" 180000, "start at" "2025 01 12t03 36 05+02 00", "end at" "2025 01 12t03 39 05+02 00", "metrics" { "heartrate max" 55, "heartrate avg" 55, "heartrate min" 55 } }, { "division ref" 4, "division label" "light", "duration" 30000, "start at" "2025 01 12t03 39 05+02 00", "end at" "2025 01 12t03 39 35+02 00" }, { "division ref" 1, "division label" "awake", "duration" 120000, "start at" "2025 01 12t03 39 35+02 00", "end at" "2025 01 12t03 41 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 120000, "start at" "2025 01 12t03 41 35+02 00", "end at" "2025 01 12t03 43 35+02 00", "metrics" { "heartrate max" 54, "heartrate avg" 54, "heartrate min" 54 } }, { "division ref" 1, "division label" "awake", "duration" 60000, "start at" "2025 01 12t03 43 35+02 00", "end at" "2025 01 12t03 44 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 3690000, "start at" "2025 01 12t03 44 35+02 00", "end at" "2025 01 12t04 46 05+02 00", "metrics" { "heartrate max" 55, "heartrate avg" 53, "heartrate min" 52 } }, { "division ref" 6, "division label" "rem", "duration" 900000, "start at" "2025 01 12t04 46 05+02 00", "end at" "2025 01 12t05 01 05+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 57, "heartrate min" 55 } }, { "division ref" 1, "division label" "awake", "duration" 120000, "start at" "2025 01 12t05 01 05+02 00", "end at" "2025 01 12t05 03 05+02 00" }, { "division ref" 4, "division label" "light", "duration" 240000, "start at" "2025 01 12t05 03 05+02 00", "end at" "2025 01 12t05 07 05+02 00", "metrics" { "heartrate max" 55, "heartrate avg" 55, "heartrate min" 55 } }, { "division ref" 6, "division label" "rem", "duration" 90000, "start at" "2025 01 12t05 07 05+02 00", "end at" "2025 01 12t05 08 35+02 00" }, { "division ref" 1, "division label" "awake", "duration" 90000, "start at" "2025 01 12t05 08 35+02 00", "end at" "2025 01 12t05 10 05+02 00" }, { "division ref" 4, "division label" "light", "duration" 120000, "start at" "2025 01 12t05 10 05+02 00", "end at" "2025 01 12t05 12 05+02 00", "metrics" { "heartrate max" 57, "heartrate avg" 57, "heartrate min" 57 } }, { "division ref" 1, "division label" "awake", "duration" 90000, "start at" "2025 01 12t05 12 05+02 00", "end at" "2025 01 12t05 13 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 510000, "start at" "2025 01 12t05 13 35+02 00", "end at" "2025 01 12t05 22 05+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 57, "heartrate min" 55 } }, { "division ref" 1, "division label" "awake", "duration" 90000, "start at" "2025 01 12t05 22 05+02 00", "end at" "2025 01 12t05 23 35+02 00" }, { "division ref" 4, "division label" "light", "duration" 3000000, "start at" "2025 01 12t05 23 35+02 00", "end at" "2025 01 12t06 13 35+02 00", "metrics" { "heartrate max" 57, "heartrate avg" 54, "heartrate min" 52 } }, { "division ref" 6, "division label" "rem", "duration" 1590000, "start at" "2025 01 12t06 13 35+02 00", "end at" "2025 01 12t06 40 05+02 00", "metrics" { "heartrate max" 60, "heartrate avg" 56, "heartrate min" 54 } }, { "division ref" 1, "division label" "awake", "duration" 30000, "start at" "2025 01 12t06 40 05+02 00", "end at" "2025 01 12t06 40 35+02 00" }, { "division ref" 6, "division label" "rem", "duration" 960000, "start at" "2025 01 12t06 40 35+02 00", "end at" "2025 01 12t06 56 35+02 00", "metrics" { "heartrate max" 57, "heartrate avg" 56, "heartrate min" 55 } }, { "division ref" 4, "division label" "light", "duration" 2340000, "start at" "2025 01 12t06 56 35+02 00", "end at" "2025 01 12t07 35 35+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 56, "heartrate min" 55 } }, { "division ref" 5, "division label" "deep", "duration" 90000, "start at" "2025 01 12t07 35 35+02 00", "end at" "2025 01 12t07 37 05+02 00" }, { "division ref" 4, "division label" "light", "duration" 750000, "start at" "2025 01 12t07 37 05+02 00", "end at" "2025 01 12t07 49 35+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 56, "heartrate min" 55 } }, { "division ref" 1, "division label" "awake", "duration" 30000, "start at" "2025 01 12t07 49 35+02 00", "end at" "2025 01 12t07 50 05+02 00" }, { "division ref" 4, "division label" "light", "duration" 540000, "start at" "2025 01 12t07 50 05+02 00", "end at" "2025 01 12t07 59 05+02 00", "metrics" { "heartrate max" 58, "heartrate avg" 58, "heartrate min" 58 } } ] } ] } metrics availability not all metrics are available for for all metric type below you can find which metric type is available for which records /// only metrics from this list are accepted by `getrecords` call public static var availableforrecordsrequest \[metrictype] = \[ stepstotal, caloriesburnedactive, caloriesburnedbasal, caloriesburned, distancetotal, distancewalking, distancecycling, distancerunning, weight, height, vo2max, heartrateresting, hrvsdnn, hrvrmssd, spo2, spo2max, spo2min, spo2avg, bodytemperature, skintemperature, ] /// only metrics from this list are accepted by `getactivities` call public static var availableforactivitiesrequest \[metrictype] = \[ stepstotal, caloriesburnedactive, caloriesburnedbasal, caloriesburned, distancetotal, distancewalking, distancecycling, distancerunning, heartratemax, heartrateavg, heartratemin, heartrate, heartrateresting, hrvsdnn, hrvrmssd, elevationmax, elevationavg, elevationmin, elevationgain, elevationloss, ascent, descent, floorsclimbed, speedmax, speedavg, speedmin, airtemperaturemax, airtemperatureavg, airtemperaturemin, spo2, spo2max, spo2avg, spo2min, longitude, latitude, elevation, durationactive, swimminglengths, swimmingdistanceperstroke, vo2max, ] /// only metrics from this list are accepted by `getsleep` call public static var availableforsleeprequest \[metrictype] = \[ heartrate, heartrateavg, heartratemin, heartratemax, hrvsdnn, hrvrmssd, spo2, spo2max, spo2min, spo2avg, sleepbreathingrate, sleepbreathingratemin, sleepbreathingratemax, sleepbreathingrateavg, skintemperature, ] metrics descriptions metric description unit air temperature average measured air temperature celsius air temperature max maximum recorded air temperature celsius air temperature min minimum recorded air temperature celsius ascent cumulative elevation gain during an activity meters bedtime duration total duration spent in bed ms body mass index calculated body mass index (bmi) based on weight and height count body temperature average measured body temperature celsius body temperature max maximum recorded body temperature celsius body temperature min minimum recorded body temperature celsius cadence average number of cadence rpm cadence max maximum observed cadence during an activity rpm cadence min minimum observed cadence during an activity rpm calories burned total number of calories burned kcal calories burned active total calories burned throughout an activity kcal calories burned basal total basal metabolic calories burned kcal calories intake total caloric intake kcal descent cumulative elevation loss during an activity meters distance total distance covered meters distance cycling distance traveled by cycling meters distance running distance covered while running meters distance swimming distance swum during the activity meters distance walking distance covered while walking meters distance wheelchair distance traveled using a wheelchair meters duration active total time spent in active movement ms ecg rri time interval between successive r peaks in ecg data ms ecg voltage measured electrical potential differences across ecg leads uv elevation average elevation above sea level meters elevation gain total elevation gained during an activity meters elevation loss total elevation lost during an activity meters elevation max maximum elevation reached meters elevation min minimum elevation reached meters floors climbed total number of floors climbed during the recorded period count heartrate average heart rate measured bpm heartrate max maximum recorded heart rate bpm heartrate min minimum recorded heart rate bpm heartrate resting resting heart rate bpm height height meters hrv rmssd heart rate variability measured as rmssd (root mean square of successive differences) ms hrv sdnn heart rate variability measured as sdnn (standard deviation of normal to normal) ms latitude average latitude position recorded degrees longitude average longitude position recorded degrees pace average pace during an activity sec/m skin temperature average measured skin temperature celsius skin temperature max maximum recorded skin temperature celsius skin temperature min minimum recorded skin temperature celsius sleep breathing rate average respiratory rate during sleep rpm sleep breathing rate max maximum respiratory rate during sleep rpm sleep breathing rate min minimum respiratory rate during sleep rpm sleep duration total sleep duration ms sleep duration awake total time spent awake during a sleep period ms sleep duration deep total time spent in deep sleep ms sleep duration light total time spent in light sleep ms sleep duration nap total duration of a nap ms sleep duration rem total time spent in rem sleep ms sleep efficiency percentage of time spent asleep relative to time in bed percentage sleep interruptions total number of awakenings or sleep interruptions count sleep latency time taken to fall asleep after going to bed ms sleep score overall sleep quality score percentage speed average speed during an activity m/sec speed max maximum speed reached during an activity m/sec speed min minimum speed during an activity m/sec spo2 average blood oxygen saturation level percentage spo2 max maximum recorded blood oxygen saturation level percentage spo2 min minimum recorded blood oxygen saturation level percentage steps total number of steps taken count swimming distance per stroke average distance swum per stroke meters swimming lengths number of pool lengths swum during a session count vo2max estimated maximal oxygen uptake ml/kg/min wakeup latency time taken to get out of bed after waking up ms weight weight g