Quantcast
Channel: Support & Bugs - Matomo forums
Viewing all articles
Browse latest Browse all 5706

Reporting API getDownload encoding downloadUrl

$
0
0

@Shaun_Donovan wrote:

Hi all.

I am brand new to Piwik and am trying to get the API to report the number of downloads of a specific file. From the documentation I have
- Actions.getDownload (downloadUrl, idSite, period, date, segment = '')
and I am told that I need to urlencode the downloadUrl.

My download url (for testing) is:
'http://192.168.1.82/dspace/bitstream/handle/123456789/51915/revocation.txt?sequence=1&isAllowed=y'
and urlencoded it becomes
http%3A%2F%2F192.168.1.82%2Fdspace%2Fbitstream%2Fhandle%2F123456789%2F51915%2Frevocation.txt%3Fsequence%3D1%26isAllowed%3Dy
so my full query becomes:
http://192.168.1.1/piwik/?module=API&method=Actions.getDownload&downloadUrl=http%3A%2F%2F192.168.1.82%2Fdspace%2Fbitstream%2Fhandle%2F123456789%2F51915%2Frevocation.txt%3Fsequence%3D1%26isAllowed%3Dy&idSite=2&period=month&date=today&segment=

But when I run this, I get an empty result although I can see the downloads through the web interface.
Can anybody please tell me what I am doing wrong?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 5706

Trending Articles