home api list

Hexostore API Documentation

profile

/api/profile/

List methods: get

Detail methods: get, put, patch

The User Profile stores extended user information.

The fitness object contains Key Performance Indicators (KPIs), each derived from a collection of one or more asyncs presented as metrics with fields for value, datatype, and KPI name.

To query the KPI values, use the endpoint:

/api/profile/{id}/fitness/{kpi name}/

It will return a list of KPIs and a meta object (limit, next, previous, etc.) like a normal endpoint. You may filter on the start field to narrow the results.

To create a new value, POST to the appropriate KPI endpoint. The POST must be an object that contains a value field (float) and optionally a start field (hexotimestamp). The start will default to the current hexotimestamp if not supplied. For example:

{"value": 68.7, "start": 364786135085}

The fitness KPI return the population distribution for the user's age group and gender. The distributions are based on the data from the american census (NAHNES 2007-2008). The distributions are accessible through the endpoints:

/api/profile/{id}/populationdistribution/
/api/profile/{id}/populationdistribution/{kpi name}/

The fitness KPI contains a zone. This zone is a a number between 1 and 5 saying in which quintile of the population the user is situated. These quintile positions are based on the population distribution for the same age group and sex. Example: a VO2 Max zone of 5 means that the user is in the top fifth of the population.

The userprofile also contains user-specific zones to define training zones or to compare to users of the same age group and gender zone. The zones are automatically included when applicable.

Rendering profile.html

Available KPIs

Name Unit Description Distribution Target zone

abdominal_circumference

m

User's Abdominal Circumference.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

blood_glucose_level

mg/dL

User's blood glucose level (manual entry).

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

bmi

User's body mass index (BMI).

BMI distribution for a population of the same age group and sex as the user. Values are based on NAHNES 2007-2008

https://www.census.gov/compendia/statab/2012/tables/12s0210.pdf

BMI target zones.

{1: severe thinness, 2: underweight, 3: normal, 4: overweight, 5: obese}

breast_circumference

m

User's Breast Circumference. For Women.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

bust_level

m

User's Bust Level. Corresponds to measurement A, only for children.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

diastolic_blood_pressure

mmHg

User's diasystolic blood pressure.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

height

m

User's height.

Height distribution for a population of the same age group and sex as the user. Values are based on NAHNES 2007-2008

https://www.census.gov/compendia/statab/2012/tables/12s0210.pdf

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

hr_max

bpm

This Metric does double duty depending on the context. On a range or record it represents maximum value of the heartrate on given period, in a profile it represents the user's overall maximum heart rate.

HRMax distribution for a population of the same age as the user. Values based on:

Tanaka et al. (2001). J Am Coll Cardiology, 37(1), 153-156.

hr_max target zones. Based on hr_max as a function of age.

Tanaka, Monahan, & Seals (2001)

{1: low, 2: normal, 3: normal, 4: normal, 5: high}

hr_recov

bpm

The Heart Rate Recovery is the reduction of heartrate after a fixed duration of recovery (1 minute) after a peak intensity exercise.

HR_recovery distribution.

Watanabe et al. (2001) Circulation, 104(16), 1911-1916.

hr_recovery target zones.

{1: poor, 2: average, 3: good, 4: excellent, 5: superior}

hr_rest

bpm

The resting heart rate is the lowest heart rate value that is measured laid down, when fully relaxed, without any distractions.

Return HR_rest distribution for a population of the same age as the user. The standard deviation used is the same as for get_hr_max_distribution.

hr_rest target zones.

http://www.topendsports.com/testing/heart-rate-resting-chart.htm.

{1: superior, 2: excellent, 3: good, 4: average, 5: poor}

respiration_coef

NA

User's respiration coefficient used for minuteventilationadjusted and tidalvolumeadjusted.

No distribution

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

rmssd

ms

User's RMSSD (Heart rate variability. Root Mean Square of the Successive Differences).

No distribution. Default value = None

RMSSD target zones.

{1: poor, 2: average, 3: good, 4: excellent, 5: superior}

sleep_efficiency

%

The sleep efficiency is the proportion of time asleep over the 'time in bed'. The sleep efficiency is normally over 95%. A value under 85% is generally associated as a bad night.

Sleep efficiency distribution for a population of the same age as the user.

Ohayon et al.(2004). SLEEP, 27, 1255-1274.

sleep efficiency target zones.

Ohayon et al.(2004). SLEEP, 27, 1255-1274.

{1: poor, 2: average, 3: good, 4: excellent, 5: superior}

sleep_latency

s

'Sleep latency' is the time between the sleep activity onset to the first sleepphase detections.

Sleep latency distribution for a population of the same age as the user.

Ohayon et al.(2004). SLEEP, 27, 1255-1274.

sleep latency target zones. ,, Ohayon et al.(2004). SLEEP, 27, 1255-1274.

{1: too short, 2: short, 3: good, 4: long, 5: too long}

spirometry_fef

L/s

User's Forced Expiratory Flow (manual entry).

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

spirometry_fev1

L

User's Forced Expiratory Volume after 1 Second (manual entry).

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

spirometry_fev6

L

User's Forced Expiratory Volume after 6 Second (manual entry).

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

spirometry_fvc

L

User's Forced Vital Capacity (manual entry).

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

spo2

%

User's Spo2.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

systolic_blood_pressure

mmHg

User's systolic blood pressure.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

temperature

C

User's Temperature.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

thoracic_circumference

m

User's Thoracic Circumference.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

total_sleep_time

s

The Total Sleep Time is the time spent in any sleepphase (i.e. not awake).

Total sleep time distribution for a population of the same age as the user.

Ohayon et al.(2004). SLEEP, 27, 1255-1274.

total sleep time target zones.

sleepfoundation.org/how-sleep-works/how-much-sleep-do-we-really-need.

{1: not recommended, 2: may be appropriate, 3: recommended, 4: may be appropriate, 5: not recommended}

vo2_max

ml/kg*min

VO2max is the maximum rate of oxygen consumption that is measured during a maximal aerobic exercise.

VO2_max distribution for a population of the same age as the user.

Koutlianos et al. (2013) Hippokratia 17(2): 136-140 Wang et al. (2010) American Journal of Epidemiology 171(4): 426-435

VO2_max target zones.

Heywood, V. (2006) The Physical Fitness Specialist Manual, The Cooper Institute for Aerobics Research.

{1: poor, 2: average, 3: good, 4: excellent, 5: superior}

waist_level

m

User's Waist Level. Corresponds to measurement B, only for children.

No distribution. Default value = None

No target available.

{1: na, 2: na, 3: na, 4: na, 5: na}

weight

kg

User's weight.

Weight distribution for a population of the same age group and sex as the user. Values are based on NAHNES 2007-2008

https://www.census.gov/compendia/statab/2012/tables/12s0210.pdf

Weight target zones. Based on height and BMI target zones.

{1: severe thinness, 2: underweight, 3: normal, 4: overweight, 5: obese}

Fields

avatar:

A file URL as a string. Ex: "http://media.example.com/media/photos/my_photo.jpg"

This field may be null

date_of_birth:

DOB: Date Of Birth.

This field may be blank

This field may be null

fitness:

An object containing asynchronous values describing the user's fitness.

This field is readonly.

garment_size:

Garment size (e.g., S, M, L, XL, etc.)

This field may be blank

garment_type:

Type of garment (e.g., Male, Female, Junior)

This field may be blank

gender:

user's gender

This field may be blank

This field will default to: '' (empty string)

id:

The primary key for this resource. Integer data. Ex: 2673

This field is readonly.

last_modified:

A date & time as a string. Ex: "2010-11-10T03:07:43"

This field may be blank

This field will default to: True

preferences:

Free-form object of user preferences

This field may be null

resource_uri:

The unique URI where the object resides.

This field is readonly.

unit_system:

Either "metric" or "imperial". This is the units system use to generate reports.

This field may be blank

user:

This field is only present when viewing a profile not already embedded in its user object.

This field is readonly.

Filtering Options

date_of_birth: exact, in, gt, gte, lt, lte, range

garment_size: exact

garment_type: exact

gender: exact

id: exact, in, gt, gte, lt, lte, range

short_metrics: exact

If provided (regardless of the value), display a short metric view (for faster api call)

start: exact

This is not a filtering field but the timestamp where the KPI are extracted

user: ALL_WITH_RELATIONS

Sorting Options

id, user, date_of_birth, gender

© 2024 by CarrĂ© Technologies Inc.