Heart Rate Zone
This resource provides access to a user’s Heart Rate Zone settings.
Resource URIs
Item URI: /vx/heart_rate_zones/{pk}/
Collection URI: /vx/heart_rate_zones/
Item
Item Methods
GET
Retrieve a Heart Rate Zone by id
Item properties
Name | Description | Type | HTTP Support |
---|---|---|---|
created_date |
Date the setting was created | Date | GET: required |
zones |
A list of the Heart Rate Zones in this setting | json | GET: required |
Example values
zones
{
[
{"name": "zone1", "start": integer, "end": integer},
{"name": "zone2", "start": integer, "end": integer},
...
{"name": "zone5", "start": integer, "end": integer},
]
}
Item links
self
A link to this resource
user
A link to the User resource that owns the Heart Rate Zone
Collection
Collection methods
GET
Get a list of Heart Rate Zones.
POST
Create a Heart Rate Zone.
Collection query parameters
Name | Description | Type | Required |
---|---|---|---|
user |
Either href or id of user | string or number | Yes |
Collection properties
Name | Description | Type | HTTP Support |
---|---|---|---|
total_count |
number of Heart Rate Zone settings | number | GET: required |
Collection links
self
A link to this resource
user
A link to the User resource that owns the Heart Rate Zone
Embedded collections
heart_rate_zones
A collection of Heart Rate Zone with properties as described under Item properties and links as described under Item links
Usage
GET Heart Rate Zone entity
Request GET: /vx/heart_rate_zones/{pk}/
Response
{
"zones":[
{
"start":0,
"end":80,
"name":"zone1"
},
{
"start":81,
"end":100,
"name":"zone2"
},
{
"start":101,
"end":120,
"name":"zone3"
},
{
"start":121,
"end":140,
"name":"zone4"
},
{
"start":141,
"end":160,
"name":"zone5"
}
],
"_links":{
"self":[
{
"href":"\/api\/0.1\/heart_rate_zones\/10\/",
"id":"10"
}
],
"documentation":[
{
"href":"https:\/\/developer.mapmyfitness.com\/docs\/"
}
],
"user":[
{
"href":"\/v7.0\/user\/36\/",
"id":"36"
}
]
},
"created_date":"2014-12-05T21:00:12+00:00"
}
GET Heart Rate Zone collection
Request GET: /vx/heart_rate_zones/?user=28
Response
{
"_links":{
"self":[
{
"href":"\/api\/0.1\/heart_rate_zones\/?limit=20&user=28&offset=0"
}
],
"documentation":[
{
"href":"https:\/\/developer.mapmyfitness.com\/docs\/"
}
]
},
"_embedded":{
"heart_rate_zones":[
...
]
},
"total_count":0
}
POST Heart Rate Zone entity
Request POST: /vx/heart_rate_zones/
{
"zones":[
{
"start":0,
"end":80,
"name":"zone1"
},
{
"start":81,
"end":100,
"name":"zone2"
},
{
"start":101,
"end":120,
"name":"zone3"
},
{
"start":121,
"end":140,
"name":"zone4"
},
{
"start":141,
"end":160,
"name":"zone5"
}
]
}
Response
{
"zones":[
{
"start":0,
"end":80,
"name":"zone1"
},
{
"start":81,
"end":100,
"name":"zone2"
},
{
"start":101,
"end":120,
"name":"zone3"
},
{
"start":121,
"end":140,
"name":"zone4"
},
{
"start":141,
"end":160,
"name":"zone5"
}
],
"_links":{
"self":[
{
"href":"\/api\/0.1\/heart_rate_zones\/12\/",
"id":"12"
}
],
"documentation":[
{
"href":"https:\/\/developer.mapmyfitness.com\/docs\/"
}
],
"user":[
{
"href":"\/v7.0\/user\/38\/",
"id":"38"
}
]
},
"created_date":"2014-12-05T21:00:13.150913+00:00"
}