Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Api error when pulling a hit report with date,date,date #1607

Closed
anonymous-matomo-user opened this issue Aug 16, 2010 · 2 comments
Closed

Api error when pulling a hit report with date,date,date #1607

anonymous-matomo-user opened this issue Aug 16, 2010 · 2 comments
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.

Comments

@anonymous-matomo-user
Copy link

If I use two dates or less in my api post it works:

URL:
http://piwik.mydomain.biz/index.php?token_auth=3a6b85898370f27c438b6a1cd886b874&format=PHP&module=API&method=VisitsSummary.getVisits&period=day&idSite=2&date=2010-08-15,2010-08-16

Return:
Array
(
[2010-08-15] => 165
[2010-08-16] => 99
)

If I send 3 or more days I get an error.

URL:
http://piwik.mydomain.biz/index.php?token_auth=3a6b85898370f27c438b6a1cd886b874&format=PHP&module=API&method=VisitsSummary.getVisits&period=day&idSite=2&date=2010-08-14,2010-08-15,2010-08-16

Return:
Array
(
[result] => error
[message] => Date format must be: YYYY-MM-DD, or 'today' or 'yesterday' or any keyword supported by the strtotime function (see http://php.net/strtotime for more information)
)

@mattab
Copy link
Member

mattab commented Aug 16, 2010

date is a date range. You can write date=2010-08-14,2010-08-16 to get the 3 dates data.

@anonymous-matomo-user
Copy link
Author

Replying to matt:

date is a date range. You can write date=2010-08-14,2010-08-16 to get the 3 dates data.

I feel stupid. Thank you for the quick response.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For errors / faults / flaws / inconsistencies etc. wontfix If you can reproduce this issue, please reopen the issue or create a new one describing it.
Projects
None yet
Development

No branches or pull requests

2 participants