Possible Bug in Reporting API: Events.getActionFromCategoryId

Hello,

I am trying to query the reporting API and getting unexpected results, I would like to ask for help to make sure that I’m not doing something wrong, before submitting a bug.

Brief summary:
Using API.getBulkRequest, trying to make two simultaneous queries to Events.getActionFromCategoryId with two different idSubtable’s. What I get back is the response as if I had made the query with two of the same idSubtable, instead of two different ones.

Here is my query:

https://<my_server_ip>/piwik/?
module=API&method=API.getBulkRequest&format=json&urls[0]=method=VisitsSummary.get&format=JSON&idSite=1&period=day&date=last14&urls[1]=method=Events.getActionFromCategoryId&secondaryDimension=eventAction&idSubtable=2&format=JSON&idSite=1&period=day&date=last14&urls[2]=method=Events.getActionFromCategoryId&secondaryDimension=eventAction&idSubtable=1&format=JSON&idSite=1&period=day&date=last14&token_auth=<my_auth_token>

And in the response:

I get back two copies of the results for one idSubtable (whichever idSubtable comes second in the request, I get two copies of that one). The same thing happens if I add more queries to different idSubtables: whichever one comes last, all the previous ones are also for that idSubtable.

Does everything seem sound with my query, is this response indeed unexpected?

EDIT

Not a bug. I didn’t properly URL-encode the request.

Hi there,

the idSubtable is different for each website/date combination, so you need to query parent table first (always) and then request subtables. Does it help?

Actually I solved this a while ago, turns out in each key/value pair like “urls[0]=method=VisitsSummary.get”, the value needs to be url-encoded since it has an = sign in it. It’s specified in the documentation too but I missed that the first time around.