Releasesv0.1.0
Api referenceEndpointsOmh

The user's records as Open mHealth data points

GET
/v1/users/{id}/omh/data-points

The user's records as Open mHealth data points (a header and a body that follows one schema of the Open mHealth catalog, checked against the official schemas): heart rate, steps, blood pressure, body weight, height, BMI, body fat, body temperature, oxygen saturation, respiratory rate, blood glucose and active energy samples, sleep sessions (sleep-episode) and workouts (physical-activity). In the order and with the cursor of the FHIR search; a record without an Open mHealth schema (another quantity type, a daily summary, a value in another unit) is left out, so a page can hold fewer than limit data points and still have a next_cursor. The mapping is in docs/open-mhealth.md.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid

Query Parameters

schema?string

Only the data points of one schema, bare (heart-rate) or with its namespace and, optionally, its version (omh:heart-rate, omh:heart-rate:2.0). One value; a schema the mapping does not emit is a 400.

start?|

Inclusive lower bound, RFC 3339 or YYYY-MM-DD.

end?|

Exclusive upper bound, RFC 3339 or YYYY-MM-DD. Must not be before start.

cursor?string

The next_cursor of the previous page.

limit?integer
Range1 <= value <= 1000
Default100
view?string

merged (the default): when several sources recorded the same thing (a ring and a watch the same night, a phone and a watch the same steps, one sample directly and through an aggregator), only the best ranked source's record is listed, so nothing counts twice. The order of sources is the user's (see source-priorities). all: every stored record of every source.

Default"merged"
Value in"merged""all"

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

One page, by time.

application/json
  1. response
data*array<>
next_cursor*|

Null on the last page.

curl -X GET 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/omh/data-points' \  -H 'Authorization: Bearer ohs_sk_...'
{  "next_cursor": "string",  "data": [    {      "header": {        "id": "qs-1234",        "creation_date_time": "2019-08-24T14:15:22Z",        "schema_id": {          "namespace": "omh",          "name": "heart-rate",          "version": "2.0"        },        "acquisition_provenance": {          "source_name": "string",          "source_data_point_id": "string",          "modality": "sensed"        },        "user_id": "a169451c-8525-4352-b8ca-070dd449a1a5"      },      "body": {}    }  ]}
Edit on GitHub