Releasesv0.1.0
Read data

Daily summaries

GET
/v1/users/{id}/daily

In the merged view (the default), one summary per local calendar day: each figure comes from the best ranked source that has it, and sources names that source per figure; id, the provenance and metadata are those of the day's best ranked row. With view=all, one row per provider and day. start and end compare as dates.

Authorization

tenantKey
headerAuthorizationBearer <token>

Tenant API key, ohs_sk_ + 43 base62 characters.

Path Parameters

id*string
Formatuuid

Query Parameters

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.

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"
cursor?string

The next_cursor of the previous page.

limit?integer
Range1 <= value <= 1000
Default100

Header Parameters

Authorization*string

The tenant API key, as a bearer secret.

Response Body

One page, by date.

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/daily' \  -H 'Authorization: Bearer ohs_sk_...'
{  "next_cursor": "string",  "data": [    {      "provider": "string",      "source": "string",      "device": "string",      "ingested_at": "2019-08-24T14:15:22Z",      "id": 0,      "date": "2019-08-24",      "readiness_score": 0,      "activity_score": 0,      "sleep_score": 0,      "recovery_score": 0,      "strain_score": 0,      "step_count": 0,      "active_kcal": 0,      "total_kcal": 0,      "distance_m": 0,      "floors_climbed": 0,      "resting_hr": 0,      "hrv_avg_ms": 0,      "metadata": {},      "sources": {        "property1": "string",        "property2": "string"      }    }  ]}
Edit on GitHub