API request problem


#1

Hello Piwik Support,

First, I want to say Thank You for this great tool.
I’m having the following issue with the API request.
First step: http://demo.piwik.org/index.php?module=API&method=VisitFrequency.get&idSite=7&period=range&date=2011-09-01,2011-09-03
See screen shot: [attachment 397 step-01.jpg]

Second step: http://demo.piwik.org/index.php?module=API&method=VisitFrequency.get&idSite=7&period=range&date=2011-09-01,2011-09-03&columns=nb_visits
See screen shot: [attachment 398 step-02.jpg]

Third step: http://demo.piwik.org/index.php?module=API&method=VisitFrequency.get&idSite=7&period=range&date=2011-09-01,2011-09-03
See screen shot: [attachment 399 step-03.jpg]

Is it happens due to restrictions of Piwik system or it’s a bug?
Please, advice.
Kind regards,
Alex Karpov


(Matthieu Aubry) #2

in this api response you should use &columns=nb_visits_returning


#3

http://demo.piwik.org/index.php?module=API&method=VisitFrequency.get&idSite=7&period=range&date=2011-09-01,2011-09-03&columns=nb_visits_returning

result: 0

http://demo.piwik.org/index.php?module=API&method=VisitFrequency.get&idSite=7&period=range&date=2011-09-02,2011-09-02&columns=nb_visits_returning

result: 208

The topic of my post is if I follow all these steps, I mean first to check without specifying @columns then with it and then again without. As a result of the first step the data returns, in next steps - it doesn’t. The error appears in case of the un-changed date.
So if I ever include @columns in the request, it will never return data even if the @columns is not specified.

UPD: I found out that if only the @columns parameter has been entered incorrectly, the data wasn’t return in future requests with the same data range.

UPD 2: New screen shots with logge_message enabled. Please, see attached.
[attachment 400 01.jpg][attachment 401 02.jpg][attachment 402 03.jpg]
As you can see, if I made a mistake in @columns parameter, then I’m not able to retrieve data.