Skip to content

Activity

Stream: session | Event type: activity

A tracked workout or exercise session with duration, calories, distance, and heart rate data.

{
"event_type": "activity",
"data_version": "1.1",
"source_id": "a1b2c3d4...",
"provider_ref": "12345",
"device_id": "dev-001",
"payload_ts": 1742558400000,
"revision": 1,
"capture_mode": "automatic",
"activity_type": "running",
"activity_type_raw": "Run",
"start_time": 1742558400000,
"end_time": 1742561100000,
"duration_s": 2700,
"calories_kcal": 350,
"active_calories_kcal": 310,
"steps": 5200,
"distance_m": 4800,
"elevation_gain_m": 45,
"heart_rate_avg_bpm": 145,
"heart_rate_max_bpm": 172,
"heart_rate_zones": [
{ "zone": "fat_burn", "min_bpm": 100, "max_bpm": 140, "duration_s": 600 },
{ "zone": "cardio", "min_bpm": 140, "max_bpm": 170, "duration_s": 1800 },
{ "zone": "peak", "min_bpm": 170, "max_bpm": 220, "duration_s": 300 }
]
}

Common fields (data_version, capture_mode, etc.) are documented in Common Data Item Fields. Activity-specific columns:

| Field | Type | Unit | Description | |-------|------|------|-------------| | activity_type | string \| null | — | Canonical activity type. See Activity Types. | | activity_type_raw | string \| null | — | Provider’s original label for the activity. | | start_time | number \| null | epoch ms | Session start time. | | end_time | number \| null | epoch ms | Session end time. | | duration_s | number \| null | seconds | Total duration. | | calories_kcal | number \| null | kcal | Total calories burned. | | active_calories_kcal | number \| null | kcal | Active calories only (excludes BMR). | | steps | number \| null | count | Step count during session. | | distance_m | number \| null | meters | Distance covered. | | elevation_gain_m | number \| null | meters | Elevation gained. | | heart_rate_avg_bpm | number \| null | bpm | Average heart rate during session. | | heart_rate_max_bpm | number \| null | bpm | Maximum heart rate during session. | | heart_rate_zones | array \| null | — | Time spent in each heart rate zone. |

| Field | Type | Unit | Description | |-------|------|------|-------------| | zone | string | — | Zone name (e.g., "fat_burn", "cardio", "peak"). | | min_bpm | number \| null | bpm | Lower bound of the zone. | | max_bpm | number \| null | bpm | Upper bound of the zone. | | duration_s | number \| null | seconds | Time spent in this zone. |