@tsteur opened this Issue on May 18th 2013 Member

NOTE: the code is API BREAKING only if you were early user of this feature. Please check the client code as of 1.12-b16 to make sure it works well.


wanted to integrate the new Dashboards API into Piwik Mobile by using API.getBulkRequest method.

Unfortunately, the return JSON of API.getReportMetadata seems to be invalid. Getting an error when trying to parse JSON in Browser as well as on Mobile Devices. Would be nice to have this fixed in Piwik 1.12 otherwise Dashboards won't work in Mobile App.

Example Request:

To reproduce simply goto http://jsfiddle.net/5PPxD/ , press Run and watch console.
You will see the following error message:

Uncaught SyntaxError: Unexpected token S.

Looks like the problem is caused by a documentation 'See the "Search Engines & Keywords" report for more '... Just use http://json.parser.online.fr/ to validate the JSON.

@mattab commented on May 23rd 2013 Member

In debae0756cba9e5bd2bafc9e8e037757b740e783: Fixes #3940 Adding '&format=php' to ensure the data within the bulk request, is converted only once and is valid JSON. Also works in XML (not in CSV).

I updated the bulk request doc at: http://piwik.org/docs/analytics-api/reference/#toc-advanced-users-send-multiple-api-requests-at-once

@mattab commented on May 23rd 2013 Member

@Thomas, can you confirm if you were using BULK Requests already in Piwik Mobile? I'm worried maybe my change would break something in existing users?

@mattab commented on May 23rd 2013 Member

the new version is deployed on demo so please test, thanks!

@tsteur commented on May 23rd 2013 Member

thanks a lot! it works

This Issue was closed on May 23rd 2013
Powered by GitHub Issue Mirror