운동 - JSON 내보내기 형식
JSON 내보내기에서 운동 구조에 대한 문서
Last updated: February 6, 2026
On this page
운동
운동 데이터에는 Apple Health에 기록된 달리기, 사이클링, 수영, 근력 운동 등 모든 운동 세션이 포함됩니다. JSON 내보내기에서 운동은 workouts 배열에 저장됩니다.
내보내기 버전
Health Auto Export는 두 가지 운동 내보내기 버전을 지원합니다:
- 버전 2 (권장): 더 자세한 메타데이터와 구조화된 데이터를 포함한 향상된 형식
- 버전 1 (레거시): 기존 워크플로우와의 호환성을 위해 유지되는 이전 형식
운동 버전 2
버전 2는 데이터가 사용 가능한 경우에만 포함되는 선택적 필드가 있는 포괄적인 구조를 제공합니다.
기본 구조
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Running",
"start": "2024-02-06 07:00:00 -0800",
"end": "2024-02-06 07:30:00 -0800",
"duration": 1800
}
필수 필드
id(String): 운동의 고유 식별자name(String): 운동 유형 이름 (예: "Running", "Cycling", "Swimming")start(Date):yyyy-MM-dd HH:mm:ss Z형식의 운동 시작 시간end(Date):yyyy-MM-dd HH:mm:ss Z형식의 운동 종료 시간duration(Number): 초 단위의 운동 지속 시간
선택적 필드
다음 필드는 데이터가 사용 가능한 경우에만 포함됩니다:
위치 정보
{
"location": "Outdoor",
"isIndoor": false
}
location(String):"Indoor","Outdoor","Pool","Open Water"중 하나isIndoor(Boolean): 운동이 실내에서 수행되었는지 여부
에너지 및 강도
{
"activeEnergyBurned": {
"qty": 350,
"units": "kcal"
},
"totalEnergy": {
"qty": 450,
"units": "kcal"
},
"intensity": {
"qty": 8.5,
"units": "MET"
}
}
activeEnergyBurned(Object): 운동 중 소모된 활성 칼로리totalEnergy(Object): 소모된 총 칼로리 (활성 + 휴식)intensity(Object): 작업의 대사 등가물 (MET) 값
거리 및 속도
{
"distance": {
"qty": 3.5,
"units": "mi"
},
"speed": {
"qty": 7.0,
"units": "mph"
},
"avgSpeed": {
"qty": 7.0,
"units": "mph"
},
"maxSpeed": {
"qty": 8.5,
"units": "mph"
}
}
distance(Object): 이동한 총 거리speed(Object): 현재 또는 평균 속도avgSpeed(Object): 운동 전체의 평균 속도maxSpeed(Object): 달성한 최대 속도
단위:
- 거리:
"mi"(마일) 또는"km"(킬로미터) - 속도:
"mph"(시속 마일) 또는"kmph"(시속 킬로미터)
고도
{
"elevationUp": {
"qty": 500,
"units": "ft"
},
"elevationDown": {
"qty": 450,
"units": "ft"
}
}
elevationUp(Object): 획득한 총 고도elevationDown(Object): 손실한 총 고도
단위: "ft" (피트) 또는 "m" (미터)
환경 데이터
{
"temperature": {
"qty": 72,
"units": "degF"
},
"humidity": {
"qty": 65,
"units": "%"
}
}
temperature(Object): 운동 중 주변 온도humidity(Object): 상대 습도 백분율
온도 단위: "degF" (화씨) 또는 "degC" (섭씨)
수영 전용 필드
{
"lapLength": {
"qty": 0.025,
"units": "mi"
},
"strokeStyle": "Freestyle",
"swolfScore": 45,
"salinity": "Fresh Water",
"totalSwimmingStrokeCount": {
"qty": 1200,
"units": "count"
},
"swimCadence": {
"qty": 30,
"units": "spm"
}
}
lapLength(Object): 각 랩의 길이strokeStyle(String): 다음 중 하나:"Backstroke""Breaststroke""Butterfly""Freestyle""Mixed""Kickboard""Unknown"
swolfScore(Number): 수영 효율성 점수salinity(String):"Fresh Water"또는"Salt Water"totalSwimmingStrokeCount(Object): 총 스트로크 수swimCadence(Object): 분당 스트로크 수
걸음 수 및 케이던스 데이터
{
"stepCount": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 5000,
"units": "count",
"source": "Apple Watch"
}
],
"stepCadence": {
"qty": 180,
"units": "spm"
},
"flightsClimbed": {
"qty": 10,
"units": "count"
}
}
stepCount(Array): 시간에 따른 걸음 수 측정 배열stepCadence(Object): 분당 걸음 수flightsClimbed(Object): 오른 계단 층 수
심박수 데이터
{
"heartRate": {
"min": {
"qty": 120,
"units": "bpm"
},
"avg": {
"qty": 150,
"units": "bpm"
},
"max": {
"qty": 175,
"units": "bpm"
}
},
"maxHeartRate": {
"qty": 175,
"units": "bpm"
},
"avgHeartRate": {
"qty": 150,
"units": "bpm"
},
"heartRateData": [
{
"date": "2024-02-06 07:00:00 -0800",
"Min": 120,
"Avg": 150,
"Max": 175,
"units": "bpm",
"source": "Apple Watch"
}
],
"heartRateRecovery": [
{
"date": "2024-02-06 07:30:00 -0800",
"Min": 140,
"Avg": 145,
"Max": 150,
"units": "bpm",
"source": "Apple Watch"
}
]
}
heartRate(Object): 최소, 평균 및 최대 심박수 요약maxHeartRate(Object): 운동 중 최대 심박수avgHeartRate(Object): 운동 중 평균 심박수heartRateData(Array): 운동 전체의 상세 심박수 측정heartRateRecovery(Array): 회복 기간 중 심박수 측정
시계열 데이터 배열
"운동 메트릭 포함"이 활성화된 경우 많은 메트릭을 시계열 배열로 포함할 수 있습니다:
{
"activeEnergy": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 50,
"units": "kcal",
"source": "Apple Watch"
}
],
"basalEnergy": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 20,
"units": "kcal",
"source": "Apple Watch"
}
],
"cyclingCadence": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 90,
"units": "rpm",
"source": "Apple Watch"
}
],
"cyclingDistance": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 0.5,
"units": "mi",
"source": "Apple Watch"
}
],
"cyclingPower": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 200,
"units": "W",
"source": "Power Meter"
}
],
"cyclingSpeed": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 18,
"units": "mph",
"source": "Apple Watch"
}
],
"swimDistance": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 25,
"units": "yd",
"source": "Apple Watch"
}
],
"swimStroke": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 20,
"units": "count",
"source": "Apple Watch"
}
],
"walkingAndRunningDistance": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 0.25,
"units": "mi",
"source": "Apple Watch"
}
]
}
QuantityData 구조:
date(Date): 측정의 타임스탬프qty(Number): 수량 값units(String): 측정 단위source(String, 선택사항): 데이터 소스 장치 또는 앱
HeartRateData 구조:
date(Date): 측정의 타임스탬프Min(Number): 최소 심박수Avg(Number): 평균 심박수Max(Number): 최대 심박수units(String): 단위 (일반적으로 "bpm")source(String, 선택사항): 데이터 소스 장치 또는 앱
경로 데이터
"경로 데이터 포함"이 활성화되고 운동에 GPS 데이터가 있는 경우:
{
"route": [
{
"latitude": 37.7749,
"longitude": -122.4194,
"altitude": 50.5,
"course": 45.0,
"courseAccuracy": 5.0,
"horizontalAccuracy": 10.0,
"verticalAccuracy": 15.0,
"timestamp": "2024-02-06 07:00:00 -0800",
"speed": 7.0,
"speedAccuracy": 0.5
}
]
}
위치 필드:
latitude(Number): GPS 위도 좌표longitude(Number): GPS 경도 좌표altitude(Number): 미터 단위의 고도course(Number): 도 단위의 이동 방향 (0-360)courseAccuracy(Number): 도 단위의 코스 측정 정확도horizontalAccuracy(Number): 미터 단위의 수평 위치 정확도verticalAccuracy(Number): 미터 단위의 수직 위치 정확도timestamp(Date): 위치가 기록된 시간speed(Number): 초당 미터 단위의 속도speedAccuracy(Number): m/s 단위의 속도 측정 정확도
메타데이터
{
"metadata": {
"customField": "value",
"anotherField": 123
}
}
metadata(Object): 운동과 연결된 추가 사용자 정의 메타데이터
운동 버전 1 (레거시)
버전 1은 더 간단한 구조를 사용합니다. 새로운 내보내기의 경우 버전 2가 권장됩니다.
버전 1 구조
{
"name": "Running",
"start": "2024-02-06 07:00:00 -0800",
"end": "2024-02-06 07:30:00 -0800",
"totalEnergy": {
"qty": 450,
"units": "kcal"
},
"activeEnergy": {
"qty": 350,
"units": "kcal"
},
"distance": {
"qty": 3.5,
"units": "mi"
},
"heartRateData": [
{
"date": "2024-02-06 07:00:00 -0800",
"qty": 150,
"units": "count"
}
],
"route": [
{
"lat": 37.7749,
"lon": -122.4194,
"altitude": 50.5,
"timestamp": "2024-02-06 07:00:00 -0800"
}
]
}
운동 메트릭 시간 그룹화
내보내기 버전 2를 사용하고 "운동 메트릭 포함"이 활성화된 경우 시계열 데이터의 세분성을 제어할 수 있습니다:
- 분: 운동 메트릭을 분 간격으로 그룹화
- 초: 운동 메트릭을 초 간격으로 그룹화 (더 자세함, 파일 크기 증가)
팁
- 경로 데이터 포함: 야외 운동을 위한 GPS 경로 정보를 얻으려면 이 옵션을 활성화하세요
- 운동 메트릭 포함: 심박수, 파워, 케이던스와 같은 메트릭에 대한 상세한 시계열 데이터를 얻으려면 이를 활성화하세요
- 내보내기 버전: 가장 포괄적인 데이터 구조를 위해 버전 2를 사용하세요
- GPX 내보내기: 경로 데이터는 매핑 애플리케이션에서 사용하기 위해 별도의 GPX 파일로도 내보낼 수 있습니다