Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Collection_path for adding a subscription ...

Hi,

 

Just looking for a clarification in your documentation here:

https://dev.fitbit.com/docs/subscriptions/#adding-a-subscription

 

Right now, I'm just going to query for "activities", so I know how to create the URL now. But in the future, if we add one other field for retrieval, would the URL look like this:

POST https://api.fitbit.com/1/user/-/activities%20foods/apiSubscriptions/320.json

 

Or would it have to look like this:

POST https://api.fitbit.com/1/user/-/activities/apiSubscriptions/320json
POST https://api.fitbit.com/1/user/-/foods/apiSubscriptions/320.json

 

The space-delimited approach was used above in the authentication scope process, so I thought you might use it here as well.

 

Thanks,

Carmine

Best Answer
0 Votes
2 REPLIES 2

Also, I'm assuming that you don't want me to put user_id into the path, because all of your examples are using "-" there instead. Are you getting the user_id from the access token? That's fine by me ... just let me know if that's not the case.

 

Thanks,

Carmine

Best Answer
0 Votes

And a related question:

 

 
In your documentation you list these potential scopes:
activity  The activity scope includes activity data and exercise log related features, such as steps, distance, calories burned, and active minutes
heartrate The heartrate scope includes the continuous heart rate data and related analysis
location  The location scope includes the GPS and other location data
nutrition The nutrition scope includes calorie consumption and nutrition related features, such as food/water logging, goals, and plans
profile The profile scope is the basic user information
settings  The settings scope includes user account and device settings, such as alarms
sleep The sleep scope includes sleep logs and related sleep analysis
social  The social scope includes friend-related features, such as friend list, invitations, and leaderboard
weight  The weight scope includes weight and related information, such as body mass index, body fat percentage, and goals
 
And then in the collection path, you identify these collections:
activities collection requires activity scope
body collection requires weight scope
foods collection requires nutrition
sleep collection requires sleep
If no collection specified, activity, nutrition, profile, settings, sleep, weight scope required.
 
So should I assume that heartrate, location, social will not come down this pipe, or did you not put them on the list by accident?
 
Carmine
Best Answer