Read data
Workouts
GET
tenantKeyheader
AuthorizationBearer <token>Tenant API key, ohs_sk_ + 43 base62 characters.
id*stringFormat
uuidtype?stringCanonical activity type (running, cycling...); all when absent.
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?stringmerged (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?stringThe next_cursor of the previous page.
limit?integerRange
1 <= value <= 1000Default
100One page, by start_date.
application/json- response
data*array<>next_cursor*|Null on the last page.
curl -X GET 'http://localhost:8080/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/workouts' \ -H 'Authorization: Bearer ohs_sk_...'{ "next_cursor": "string", "data": [ { "provider": "string", "source": "string", "device": "string", "ingested_at": "2019-08-24T14:15:22Z", "id": 0, "activity_type": "running", "start_date": "2019-08-24T14:15:22Z", "end_date": "2019-08-24T14:15:22Z", "duration_s": 0, "active_energy_kcal": 0, "distance_m": 0, "avg_heart_rate": 0, "max_heart_rate": 0, "avg_speed_mps": 0, "elevation_gain_m": 0, "vo2_max": 0, "external_id": "string", "metadata": {} } ]}