Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REQUEST: Add Intraday Time Series for active heart rate #20

Open
Dmain917 opened this issue Jul 16, 2018 · 0 comments
Open

REQUEST: Add Intraday Time Series for active heart rate #20

Dmain917 opened this issue Jul 16, 2018 · 0 comments

Comments

@Dmain917
Copy link

I would like to be able to display the FitBit Intraday Time Series for active heart rate (this gives you the ability to refresh every second for a 'real-time' heart rate).

Before any end user could do this, they would need to request access to the Intraday Time Series from Fitbit. The application must be classified as 'Person App'

To request access, contact private support: https://dev.fitbit.com/build/reference/web-api/help/

More info here: https://dev.fitbit.com/build/reference/web-api/heart-rate/

Resource URLs
There are four acceptable formats for retrieving time series data:
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level].json
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/[end-date]/[detail-level]/time/[start-time]/[end-time].json
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/1d/[detail-level].json`
GET https://api.fitbit.com/1/user/-/activities/heart/date/[date]/1d/[detail-level]/time/[start-time]/[end-time].json

date | The date, in the format yyyy-MM-dd or today.
detail-level | Number of data points to include. Either 1sec or 1min. Optional.
start-time | The start of the period, in the format HH:mm. Optional.
end-time | The end of the period, in the format HH:mm. Optional.

Example Request
GET https://api.fitbit.com/1/user/-/activities/heart/date/today/1d/1sec/time/00:00/00:01.json

Example Response:
{
"activities-heart": [
{
"customHeartRateZones": [],
"dateTime": "today",
"heartRateZones": [
{
"caloriesOut": 2.3246,
"max": 94,
"min": 30,
"minutes": 2,
"name": "Out of Range"
},
{
"caloriesOut": 0,
"max": 132,
"min": 94,
"minutes": 0,
"name": "Fat Burn"
},
{
"caloriesOut": 0,
"max": 160,
"min": 132,
"minutes": 0,
"name": "Cardio"
},
{
"caloriesOut": 0,
"max": 220,
"min": 160,
"minutes": 0,
"name": "Peak"
}
],
"value": "64.2"
}
],
"activities-heart-intraday": {
"dataset": [
{
"time": "00:00:00",
"value": 64
},
{
"time": "00:00:10",
"value": 63
},
{
"time": "00:00:20",
"value": 64
},
{
"time": "00:00:30",
"value": 65
},
{
"time": "00:00:45",
"value": 65
}
],
"datasetInterval": 1,
"datasetType": "second"
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant