Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


BREAKING API change: Format of data returned in "Bulk request" mode has changed #3940

tsteur opened this Issue · 4 comments

2 participants

Thomas Steur Matthieu Aubry
Thomas Steur

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 , 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 to validate the JSON.

Matthieu Aubry

In debae07: 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:

Matthieu Aubry

@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?

Matthieu Aubry

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

Thomas Steur

thanks a lot! it works

Thomas Steur tsteur added this to the 1.12 - The Great 1.x Backlog milestone
Matthieu Aubry mattab was assigned by tsteur
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.