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

Strange API Response for Elevation Time Series

ANSWERED

I get a strange response when I perform an API call on the Activity Time Series for Elevation EndPoint. I get the same response for the Activity Time Series Distance EndPoint. Details on Elevation below... 

 

When making the call:

https://api.fitbit.com/1/user/-/activities/tracker/elevation/today/1m.json

I get the following response: 

I/Test: {"categories":[{"activities":[{"accessLevel":"PUBLIC","activityLevels":[{"id":3016,"maxSpeedMPH":-1,"mets":8.5,"minSpeedMPH":-1,"name":"6 - 8 inch step"},{"id":3017,"maxSpeedMPH":-1,"mets":10,"minSpeedMPH":-1,"name":"10 - 12 inch step"}],"hasSpeed":false,"id":90004,"name":"Aerobic step"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":3015,"mets":6.5,"name":"Aerobic, general"},{"accessLevel":"PUBLIC","activityLevels":[{"id":3020,"maxSpeedMPH":-1,"mets":5,"minSpeedMPH":-1,"name":"low impact"},{"id":3021,"maxSpeedMPH":-1,"mets":7,"minSpeedMPH":-1,"name":"high impact"}],"hasSpeed":false,"id":90005,"name":"Aerobics"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":3050,"mets":5.5,"name":"Anishinaabe Jingle Dancing or other traditional American Indian dancing"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":3010,"mets":4.800000190734863,"name":"Ballet"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":3040,"mets":3,"name":"Ballroom, slow (e.g. waltz, foxtrot, slow dancing), samba, tango, 19th C, mambo, chacha"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":3031,"mets":5,"name":"Dancing"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":3025,"mets":4.5,"name":"General, Greek, Middle Eastern, hula, flamenco, belly, swing"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":56001,"mets":5.5,"name":"Zumba"}],"id":0,"name":"Dancing"},{"activities":[{"accessLevel":"PUBLIC","hasSpeed":false,"id":4010,"mets":4,"name":"Digging worms, with shovel"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4001,"mets":3,"name":"Fishing"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4030,"mets":2.5,"name":"Fishing from boat, sitting"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4020,"mets":4,"name":"Fishing from river bank and walking"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4040,"mets":3.5,"name":"Fishing from river bank, standing"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4050,"mets":6,"name":"Fishing in stream, in waders"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4060,"mets":2,"name":"Fishing, ice, sitting"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4100,"mets":5,"name":"Hunting"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4070,"mets":2.5,"name":"Hunting, bow and arrow or crossbow"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4080,"mets":6,"name":"Hunting, deer, elk, large game"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4090,"mets":2.5,"name":"Hunting, duck, wading"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4110,"mets":6,"name":"Hunting, pheasants or grouse"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4120,"mets":5,"name":"Hunting, rabbit, squirrel, prairie chick, raccoon, small game"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":4130,"mets":2.5,"name":"Shooting"}],"id":1,"name":"Fishing and Hunting"},{"activities":[{"accessLevel":"PUBLIC","hasSpeed":false,"id":5149,"mets":2.5,"name":"Building a fire inside"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5010,"mets":3.299999952316284,"name":"Carpet sweeping, sweeping floors"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5056,"mets":7.5,"name":"Carrying groceries upstairs"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5181,"mets":3,"name":"Carrying small children"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5161,"mets":2,"name":"Change light bulb"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5185,"mets":2.5,"name":"Child care: sitting\/kneeling - dressing, bathing, grooming, feeding, occasional lifting of child-light effort, general"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5186,"mets":3,"name":"Child care: standing - dressing, bathing, grooming, feeding, occasional lifting of child-light effort"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5020,"mets":3,"name":"Cleaning"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5030,"mets":3,"name":"Cleaning, house or cabin, general"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5040,"mets":2.5,"name":"Cleaning, light (dusting, straightening up, changing linen, carrying out trash)"},{"accessLevel":"PUBLIC","hasSpeed":false,"id":5166,"mets":3,"name":"Closing windows and locking doo 

I was expecting to get back a list of "datetime" instances with elevation values for that "datetime". 

As stated in the API documentation. 

{
    "activities-log-steps":[
        {"dateTime":"2011-04-27","value":5490},
        {"dateTime":"2011-04-28","value":2344},
        {"dateTime":"2011-04-29","value":2779},
        {"dateTime":"2011-04-30","value":9196},
        {"dateTime":"2011-05-01","value":15828},
        {"dateTime":"2011-05-02","value":1945},
        {"dateTime":"2011-05-03","value":366}
    ]
}

 

Can you please check? 

Is there an alternative? 

Please advise! 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

It looks like you have misspelled the API call.  You posted the API call as

 

https://api.fitbit.com/1/user/-/activities/tracker/elevation/today/1m.json

 

try

 

https://api.fitbit.com/1/user/-/activities/tracker/elevation/date/today/1m.json

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

It looks like you have misspelled the API call.  You posted the API call as

 

https://api.fitbit.com/1/user/-/activities/tracker/elevation/today/1m.json

 

try

 

https://api.fitbit.com/1/user/-/activities/tracker/elevation/date/today/1m.json

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

**ahem**, you are right.. Thank you for taking the time to check my call.. 

Best Answer
0 Votes