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":self.int2ts(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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

No target available.

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

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

BMI target zones.

WHO 2005

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

height

m

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

No target available.

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

hr_max

bpm

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.

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

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

HR_recovery distribution.

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

hr_recovery target zones.

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

hr_rest

NA

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.

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

No target available.

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

rmssd

ms

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

RMSSD target zones.

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

sleep_efficiency

%

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

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

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 distribution for a population of the same age as the user.

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

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

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

thoracic_circumference

m

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

No target available.

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

total_sleep_time

s

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

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

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

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

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}

weight

kg

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

Fetch and save values from the get and set of Userprofile async value. Ex. userprofile.weight This is the interface layer for: - validation before saving - fetching values from from statistics - Getting default values from if no values are present Temporary values are stored in the userprofile._asyncs buffer (this is created in AsyncAttributeModel.init)

This handle the complicate iteraction necessary in django model. This can still be simplified, but it is extremely tricky to have it to work. Dont change unless you have a week to work on it

Weight target zones. Based on height and BMI target zones. From: WHO 2005

{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:

A date as a string. Ex: "2010-11-10"

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.

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.

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

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

user: ALL_WITH_RELATIONS

Sorting Options

id, user

© 2014 by CarrĂ© Technologies Inc.