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

Activity log: source vs tcxLink

Hi all,

 

I'm trying to work out which model of tracker has supplied an activity, or whether the activity was manually logged. From looking at the data however, it seems like I sometimes get a source object and sometimes get a tcxLink. Sometimes I get neither.

 

Can anyone clarify what dictates whether either of these elements will be present for a given activity?

 

And what's the recommended approach for reliably and definitively attributing an activity record to a source device?

 

Many thanks,

Tom

Best Answer
0 Votes
3 REPLIES 3

Hi @tdwright,

 

Check out the Get Activities Log List endpoint, /1/user/-/activities/list.json.  For each activity, the logType element will return how the activity was recorded (e.g. manual, auto-detected, tracker).

 

You can use the Device API, /1/user/-/devices.json, to return the list of devices attached to the account.  

 

Gordon

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

Hi Gordon,

 

Thanks for getting back to me.

 

It was actually the Get Activities Log List endpoint (/1/user/-/activities/list.json) that I was referring to. The elements it returns sometimes include a source object and sometimes a tcxLink. Sometimes the elements don't have either, but I've never seen one with both.

 

For my application it would be helpful to have a reliable way of determining which of the devices linked to a user's account contributed a particular activity. The Get Activities Log seems to be the closest to what I need, but I can't determine when (or why) either source or tcxLink will be present, which is proving a challenge.

 

As a "bodge", I'm currently using the Devices endpoint (/1/user/-/devices.json) and assuming that any tracker devices present at the time of the activity are equally likely to have contributed to an item in the log. Not ideal, obviously, so I'd really like to get a better handle on the activities log.

 

Thanks again,

Tom

Best Answer

@tdwright curious if your question was answered? I have the same question

Best Answer
0 Votes