API Actions.getDownloads Request problem


I am not actually sure if it’s me or if the update (either 1.4 or 1.5) broke it.

I have a domain (mysterytwisterc3.org) which has several subdomains and I wanted to get file download stats. For one domain this was easy, for multiple domains not so much but I figured it out be reverse building the request which is sent when you go into Piwik -> Actions -> Downloads and enter a search. (Note: all described steps were taking at least two updates ago, on 1.3 I believe)

The request was this:

I then modified it to fit the API. First I removed every bit of parameter which didnt alter the information I got. When I had only the information I needed (removing filter_limit, sort and so on) in the request, I made it a API request (I think by just exchanging method and module parameters and I finally had this request:


And it worked perfectly! I used this request via the PHP API (including necessary files and so on). I unserialized the response and used the data.

Now I see it doesn’t work anymore and I can’t get it to work.
Note: My Request in PHP also included the format=php parameter which I omitted above.

In case there are any questions: The day I did this, I also documented this on my blog so if I am unclear or not very accurate, this can also be found here: http://javex0.wordpress.com/2011/06/09/getting-file-downloads-from-the-piwik-api-in-phpjoomla/

So everything went fine. But since 1.4 (I think) it does not work any more. I thought this might be a problem on the software’s side since the examples don’t seem to work either:
Actions.getDownloads examples all return nothing ( for example) while others seem to still work.

Oh and my final PHP function looks like this:

function piwikRequest($method = "", $idSite = 1, $date = "", $period = "", $additional_params = "")
		$token = $this->piwik_token;
		// This inits the API Request with the specified parameters
		$request = new Piwik_API_Request("
		return unserialize($request->process());

With this being a typical call:

$this->piwikRequest('Actions.getDownloads', 1, $date, "range", 

$date is correctly formatted being a start date and the current day built by php. The filter_pattern is for the filename: All files start with this so I only search for those files.

So this is basically it. It used to work and now it doesn’t which I find pretty confusing since I don’t remember changing anything.

I hope someone can clear this a bit for me.