> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mirobody.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Apple Health Import

> ヘルスケアの書き出しデータを読み込むか、許可したクライアントから記録を受け取ります。

対象 mirobody
`1.5.10`
· 元ファイル
[`docs/site/apple-health.md`](https://github.com/thetahealth/mirobody/blob/b37cd7b24af5251a4364aab30905a7497fc69dcb/docs/site/apple-health.md)

> [!NOTE]
>
> このページの日本語版はまだありません。以下は英語の原文です。

Import an export from the iOS Health app, or send HealthKit records from an
authorized client app. Apple Health does not provide a server-side OAuth
connection like the device cloud services.

## Import an export

In Health, open your profile and choose **Export All Health Data**.
The base Python package can read the archive without a model or database:

```bash theme={null}
mirobody import apple export.zip
```

To store it in a person's record, use an application installation with its
server configuration:

```bash theme={null}
mirobody import apple export.zip --into <user-id>
```

Re-importing the same archive does not add another copy. When export data and
phone pushes overlap, daily aggregation selects a source rather than adding
both streams together.

## Client integration

Authenticated clients can send HealthKit JSON to `POST /apple/health`.
Use Apple's identifiers, such as `HKQuantityTypeIdentifierHeartRate`, and
send each record's original unit with `startDate` and `endDate`.

* Dates accept epoch milliseconds or Apple's date strings with an offset.
* Percentage quantities use fractions: 98% oxygen saturation is `0.98`.
* Category values use the corresponding `HKCategoryValue*` string.
* Clients should deduplicate live pushes before sending them.

CDA documents use the application’s CDA import path.
Supported types, request examples and validation behavior are in the
[Apple Health reference](https://github.com/thetahealth/mirobody/blob/b37cd7b24af5251a4364aab30905a7497fc69dcb/docs/apple-health.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.