Getting a list of activities within a date range

For example if a user does 3 activities on 5th Jan. I want to be able to query the 5th of Jan alone and get all the activities (with decent data) for that day.

---------------------------------------------------------------------------------------------------------------------------------------

What I've tried so far:

This endpoint: 

Get Daily Activity Summary

GET https://api.fitbit.com/1/user/[user-id]/activities/date/[date].json

would allow me to get that data but it only includes activities manually logged.

I tried this endpoint:

Activity Time Series

GET /1/user/[user-id]/[resource-path]/date/[date]/[period].json
GET /1/user/[user-id]/[resource-path]/date/[base-date]/[end-date].json

But the data returned is not what I need, it comes back with one single granular value.

The closest I have got, is this endpoint:

Get Activity Logs List

GET https://api.fitbit.com/1/user/-/activities/list.js

This allows me to get a collection of activities but it only allows me do this from a certain date or before a certain date. This date range is too vast. At scale it will return far too much data to process.

--------------------------------------------------------------------------------------------------------------------------------
Possible solutions:

Get Daily Activity Summary
This endpoint should also return activities which are not manually logged (could take in a `boolean` parameter to achieve this).

Activity Time Series
This endpoint supports a date range but the resource path options return very specific data:

activities/calories
activities/caloriesBMR
activities/steps
activities/distance
activities/floors
activities/elevation
activities/minutesSedentary
activities/minutesLightlyActive
activities/minutesFairlyActive
activities/minutesVeryActive
activities/activityCalories

add a new resource path `activities/activitySummary` which returns more data relating to the activity.

Get Activity Logs List
allow this endpoint to support a date range.

Maybe one of these could be implemented quite easily.

Thanks,
Sami

11 Comments
Rich_Laue
Community Legend

Have you posted on the developers section? 

samiggapps
Recovery Runner

Not exactly sure what you mean, my original post for this was here https://community.fitbit.com/t5/Web-API-Development/Activity-Summary-based-on-date-range/td-p/338497... as a reply to an existing issue.

I was guided by one of the Fitbit devs to post it here.

Let me know if anywhere better to post to gain more traction.

Cheers

JohnFitbit
Premium User
Fitbit Developer
Fitbit Developer

Hi @samiggapps,

 

Thanks for posting here. I'll also bring this to our team's attention to begin tracking interest for this idea.

 

Let me know if you have any additional questions in the meantime!

Status changed to: Reviewed By Moderator
JohnFitbit
Premium User
Fitbit Developer
Fitbit Developer
 
JohnFitbit
Premium User
Fitbit Developer
Fitbit Developer

Hi @samiggapps,

 

Thanks again for sharing your idea with us.

 

Our team reviewed this request and implemented it. You should now see all manual, tracker, app, and site logged activities returned in the Get Activity Daily Summary endpoint.

 

Please let me know if you have any other questions.

Status changed to: Released
JohnFitbit
Premium User
Fitbit Developer
Fitbit Developer
 
Rich_Laue
Community Legend

I'm not sure where to find this Get Activity Daily Summary @JohnFitbit 

How is it different from the activities page which I've always, but not always easily, seen all recorded activity between 2 dates. 

samiggapps
Recovery Runner

@JohnFitbit 

Thanks so much for implementing this! 👍

It would be great if you could update the API Docs to clarify that the Get Activity Daily Summary endpoint will now support this.

This will really help other devs with their integrations! 

prateek.gupta
Jogger

can any body tell me how to get two days between data i am not able to get it

J3ffH1ll
Jogger

...so where exactly is this new feature documented? Can we get an example of a fetch for the last week of activity? Should I submit a feature request that this feature be documented? Shouldn't released features contain a link to their documentation?

Apologies if I missing something obvious, but I've been digging around for over an hour, and this thread is the closest I've gotten 🙂

Amarjeet987
First Steps

Where is this feature documented? Not able to find it. As per the docs, the activity summary api still takes a single date.

To comment, you must first accept the terms of the Idea and Feedback Submission policy.