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

Subscription API Detail

After subscribing to ALL events using API below

 

 

 

POST <a href="https://api.fitbit.com/1/user/-/apiSubscriptions/1234.json" target="_blank">https://api.fitbit.com/1/user/-/apiSubscriptions/1234.json</a><br /><code></code>

 

 

 

This is what I get from subscription notification.

 

[ { collectionType: 'activities',
date: '2019-01-23',
ownerId: 'xxxxxx',
ownerType: 'user',
subscriptionId: '1234' } ]

 

Some documents suggested that I can get activities from URL below

 

 

<a href="https://api.fitbit.com/1/user/xxxxxx/activities/date/2019-01-23.json" target="_blank">https://api.fitbit.com/1/user/xxxxxx/activities/date/2019-01-23.json</a><br /><code></code>

 

 

 

But there's no detail inside this API.

 

My question is, how can I know WHICH activities actually updates.

 

 

Recently my solutions is just go through all types, steps floors distance calories minutesFairlyActive, and see what has been update, using the URL below.

 

https://api.fitbit.com/1/user/-/activities/${resource}/date/today/3m.json

 

I am collecting data type like

 

steps: [
{
dateTime: "2018-10-23",
value: "0"
},
{
dateTime: "2018-10-24",
value: "0"
},
{
dateTime: "2018-10-25",
value: "0"
},
{
dateTime: "2018-10-26",
value: "0"

 

I don't my solution is a good way .

 

Looking for help. Any suggestions ?

 

Thanks so much.

 

Best Answer
0 Votes
1 REPLY 1

Hi @geniustanley

 

I think I've answered this question for you in a similar post.  The Activity endpoint in the documentation is just an example.  You can query any Activity, Activity Time Series or Activity Intraday endpoint to retrieve the updated data.  

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes