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

Breaking HTTP API change in Matomo 4 #16008

Closed
tsteur opened this issue Jun 2, 2020 · 1 comment · Fixed by #16041
Closed

Breaking HTTP API change in Matomo 4 #16008

tsteur opened this issue Jun 2, 2020 · 1 comment · Fixed by #16041
Assignees
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Milestone

Comments

@tsteur
Copy link
Member

tsteur commented Jun 2, 2020

see

https://example.com/index.php?urls%5B0%5D=method%3dUsersManager.getUserPreference%26preferenceName%3ddefaultReport%26format%3dJSON%26userLogin%3droot%26&urls%5B1%5D=method%3dUsersManager.getUserPreference%26preferenceName%3ddefaultReportDate%26format%3dJSON%26userLogin%3droot%26&module=API&date=today&token_auth=YOURTOKEN&period=day&format=json&method=API.getBulkRequest&language=en&

In Matomo 3, this returns ["12","today"]. Seems to return same with json2 format.

vs in Matomo 4 this returns

[{"value":"12"},{"value":"today"}]

And therefore breaks eg the Matomo mobile app.

Here's the request's individual params:

image

@tsteur tsteur added the not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org. label Jun 2, 2020
@tsteur tsteur added this to the 4.0.0 milestone Jun 2, 2020
@tsteur tsteur changed the title Breaking API change in Matomo 4 Breaking HTTP API change in Matomo 4 Jun 2, 2020
@tsteur tsteur self-assigned this Jun 5, 2020
@tsteur
Copy link
Member Author

tsteur commented Jun 5, 2020

fyi looks like this is a regression from removing the PHP serialise https://github.com/matomo-org/matomo/pull/15558/files#diff-2d0bb82438495c9259aa4ef3211b6b36R527

tsteur added a commit that referenced this issue Jun 8, 2020
sgiehl added a commit that referenced this issue Jun 10, 2020
* Document breaking change in bulk request API

Follow up from #16020 

fix #16008

* add test case for regression

* Update CHANGELOG.md

Co-authored-by: Stefan Giehl <stefan@matomo.org>

Co-authored-by: Stefan Giehl <stefan@matomo.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
not-in-changelog For issues or pull requests that should not be included in our release changelog on matomo.org.
Projects
None yet
1 participant