09-16-2014 08:43 - edited 09-16-2014 08:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2014 08:43 - edited 09-16-2014 08:55
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The documentation for the XML response for the API-Get-Time-Series call states the XML schema should be:
<?xml version="1.0" encoding="UTF-8"?> <result> <[requested-resource]> <data> <dateTime>[record-date]</dateTime> <value>[value]</value> </data> [...] </[requested-resource]> </result> |
https://wiki.fitbit.com/display/API/API-Get-Time-Series
Currently, the response we are getting from the API is different. The <data> node is now <apiData>. Since we explicitly call into the <data> node, our app is now unable to sync data.
Was this an intentional change that will remain going foward or was this unintentional? I couldn't find any communications stating this change was imminent.
Thanks,
-Tim
Answered! Go to the Best Answer.

Accepted Solutions
09-17-2014 09:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-17-2014 09:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Please check after 1pm PDT today. Changes related to this issue should take effect by that time.
Senior Software Developer at Fitbit
09-16-2014 08:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-16-2014 08:57
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello Tim,
We're working ont fixing it right now.
Should be fixed back to <data> soon.
Apologies for any inconvenience.
Senior Software Developer at Fitbit

09-16-2014 08:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2014 08:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ivan -
Thanks for the update. Glad to hear it's going back to <data>.
-Tim

09-16-2014 09:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-16-2014 09:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Tim,
In the mean while, can you please provide full API uri you're making request with.
Senior Software Developer at Fitbit

09-16-2014 09:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2014 09:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Our users are also facing the same issue. What is an ETA on fixing this issue?
Thanks,
Sushant

09-16-2014 09:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2014 09:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi,
We have the same issue. One the Urls we used was "/1/user/-/activities/tracker/calories/date/2014-09-16/1m.xml". Hope it helps.
Thanks,
Yuttana

09-16-2014 10:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2014 10:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Ivan -
We make the following calls.
https://api.fitbit.com/1/user/-/activities/steps/date/{0}/{1}.xml
https://api.fitbit.com/1/user/-/sleep/minutesAsleep/date/{0}/{1}.xml
https://api.fitbit.com/1/user/-/body/weight/date/{0}/{1}.xml
https://api.fitbit.com/1/user/-/activities/minutesVeryActive/date/{0}/{1}.xml
https://api.fitbit.com/1/user/-/activities/distance/date/{0}/{1}.xml
https://api.fitbit.com/1/user/-/foods/log/water/date/{0}/{1}.xml
* {0} and {1} represent placeholders where we inject dates.
Thanks,
-Tim

09-16-2014 10:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-16-2014 10:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
First, we are sincerely sorry for this bug. This is unacceptable and we're working on ways to prevent it from happening again.
Second, Fitbit will be deprecating XML in future versions of the API. We'll be sharing more about that in the coming weeks. You might try switching to the JSON version of the API, which is not affected by this bug.

09-16-2014 11:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2014 11:29
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
Can you please update us when this issue is fixed? I would really appreicate if someone get back to us on this and provide an ETA. In my Fitbit profile as well on Fitbit.com, I still see 0 Steps while I know I have lots of steps on the device for varous days.
Thank You,
Sushant

09-16-2014 11:31 - edited 09-16-2014 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-16-2014 11:31 - edited 09-16-2014 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@theking wrote:
In my Fitbit profile as well on Fitbit.com, I still see 0 Steps while I know I have lots of steps on the device for varous days.
Fitbit.com and Fitbit mobile apps are not affected by this issue. Only third-party applications that use XML instead of JSON are affected.

09-16-2014 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-16-2014 11:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Today only I walked about 1 and half mile so far. Nothing in my profile. If i go look at other dates, its same.

09-16-2014 11:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-16-2014 11:38
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@theking wrote:
Today only I walked about 1 and half mile so far. Nothing in my profile. If i go look at other dates, its same.
This is unrelated. Please contact Fitbit Support for syncing and dashboard problems.

09-16-2014 15:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-16-2014 15:19
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
The change that fixes <apiData> fileds to be <data> had been made and currently under testing.
Approximate time when it hits production is Sep 17 2014 1:00pm PDT.
Senior Software Developer at Fitbit

09-16-2014 15:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-16-2014 15:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
@ibahdanau wrote:
The change that fixes <apiData> fileds to be <data> had been made and currently under testing.
Approximate time when it hits production is Sep 17 2014 1:00pm PDT.
And again—you can fix this problem immediately in your application by switching to JSON.

09-17-2014 08:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-17-2014 08:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thank you for the update. We have created a task to switch to JSON from XML at our end. Please let us know when changes at your end goes live with this specific fix. We will have our code changed to use JSON by end of this month.
Thanks,
Sushant

09-17-2014 09:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


09-17-2014 09:04
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Please check after 1pm PDT today. Changes related to this issue should take effect by that time.
Senior Software Developer at Fitbit
09-17-2014 19:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-17-2014 19:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello Fitbit API team,
My website is using Fitbit API but it's data's structure is changed many times from [data] to [apiData] and today it is changed back to [data].
These changes made my website cannot work and i had to change my code many times, but before i know this issue happened, my users sent many complaining to me.
$apiCall = "http://api.fitbit.com/1/user/-/activities/tracker/minutesVeryActive/date/today/3m.xml"; $oauth->fetch($apiCall); $response = $oauth->getLastResponse(); $xmlext1 = simplexml_load_string($response); foreach ($xmlext1->{'activities-tracker-minutesVeryActive'}->data as $record) { array_push($totalVAM, floatval($record->value)); }
You can see the RED code. Currently, when i get data from Fitbit API, i will have this:
SimpleXMLElement Object ( [activities-tracker-minutesVeryActive] => SimpleXMLElement Object ( [data] => Array ( [0] =>...
But it was changed to apiData some couple days ago, today it came back to data again.
So why it has been changed many times like this?
Thank you.
Regards,

09-18-2014 10:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post



09-18-2014 10:21
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi FBL, please see this topic: https://community.fitbit.com/t5/Web-API/API-response-XML-schema-changed-for-Get-Time-Series/m-p/4915...

