Releasesv0.1.0
Api referenceEndpointsExports

Everything held about one user, as one zip file

GET
/v1/users/{id}/archive

The answer to a data portability request: one zip file streamed in a single response (Content-Disposition: attachment) holding manifest.json (user, generation time, instance version, record count of each file, a description of each folder), user.json (the user and its provider connections, never a token), canonical/<list>.ndjson (every record of samples, category-samples, sleep, sleep-phases, workouts, workout-routes, nutrition and daily, the same JSON as the list items, one per line), fhir/bundle.json (a FHIR R4 collection Bundle of every Observation), omh/data-points.ndjson (the Open mHealth data points) and raw/... (every raw payload of the user, byte for byte, under its path below the user). A tenant key reads any user of the tenant; a user token with scope read reads only its own user, and another user is a 404. A failure once the file has started cuts the connection, so a truncated archive never looks complete. See docs/exports.md.

Authorization

headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

The archive.

response?fileapplication/zip
Formatbinary
curl -X GET 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/archive' \  -H 'Authorization: Bearer ohs_sk_...'
"string"
Edit on GitHub