09-16-2014 08:43 - edited 09-16-2014 08:55
09-16-2014 08:43 - edited 09-16-2014 08:55
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.
09-17-2014 09:04
09-17-2014 09:04
Please check after 1pm PDT today. Changes related to this issue should take effect by that time.
09-16-2014 08:57
09-16-2014 08:57
Hello Tim,
We're working ont fixing it right now.
Should be fixed back to <data> soon.
Apologies for any inconvenience.
09-16-2014 08:59
09-16-2014 08:59
Ivan -
Thanks for the update. Glad to hear it's going back to <data>.
-Tim
09-16-2014 09:07
09-16-2014 09:07
Tim,
In the mean while, can you please provide full API uri you're making request with.
09-16-2014 09:28
09-16-2014 09:28
Our users are also facing the same issue. What is an ETA on fixing this issue?
Thanks,
Sushant
09-16-2014 09:33
09-16-2014 09:33
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
09-16-2014 10:11
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
09-16-2014 10:12
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
09-16-2014 11:29
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
09-16-2014 11:31 - edited 09-16-2014 11:34
@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
09-16-2014 11:34
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
09-16-2014 11:38
@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
09-16-2014 15:19
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.
09-16-2014 15:31
09-16-2014 15:31
@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
09-17-2014 08:13
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
09-17-2014 09:04
Please check after 1pm PDT today. Changes related to this issue should take effect by that time.
09-17-2014 19:27
09-17-2014 19:27
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
09-18-2014 10:21
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...