Ingest
Upload one part of an Apple Health export
POST
One gzip NDJSON part (at most 64 MiB, never truncated), one data type per part.
Re-sending the same part is safe: the answer is 200 with duplicate: true. Other
bytes under a (day, batch, part) already stored are a 409, and so is a part sent while
this provider's data is being deleted for the user (nothing is kept; send it again
once the deletion job is done). Each instance processes a
bounded number of uploads at once; above it the answer is 503 with Retry-After.
userToken uploadheader
AuthorizationBearer <token>User token, ohs_ut_ + 43 base62 characters, with the scope the route needs.
Scope: upload
X-OHS-Type*stringHealthKit type identifier of every line of the part.
X-OHS-Day*stringFormat
dateX-OHS-Batch*stringLength
length <= 128X-OHS-Part*integerRange
0 <= value <= 1000000body*stringStored (or already stored) and queued for processing.
application/json- response
key*stringRaw object key.
duplicate*booleancurl -X POST 'http://localhost:8080/v1/ingest/apple-health' \ -H 'X-OHS-Type: HKQuantityTypeIdentifierHeartRate' \ -H 'X-OHS-Day: 2019-08-24' \ -H 'X-OHS-Batch: string' \ -H 'X-OHS-Part: 0' \ -H 'Authorization: Bearer ohs_ut_...'{ "key": "string", "duplicate": true}