Provide a library to query the PHP Reporting API #7268
Labels
c: Platform
For Matomo platform changes that aren't impacting any of our APIs but improve the core itself.
Enhancement
For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc.
While reading a Reporting API guide I did notice that we recommend to include our
index.php
into another project in order to use our PHP Reporting API Client. We also do link from the http://piwik.org/integrate page to this guide and promote it like this:I know because of defining all those constants in the example we do not actually overwrite error handlers etc and it isn't that bad therefore but still people need to call the
init()
method of the FrontController. Meaning it can be used in an application only if there's also a Piwik installation on the same server. It will load the config, all plugins, create an instance of the database etc just to create an API request. This is no good and not really useful for any PHP application. I would personally remove this from the Integrate page or at least explain in the guide what is happening there (we already explain it can be only used when Piwik is on the same server) but this is not what this issue is about.Let's provide a proper Reporting API library that calls Piwik via HTTP similar to the PiwikTracker and that can be used standalone. If this does not have any priority (which I presume) let's maybe create a repository for it and tweet / post on facebook whether someone is keen on writing one. To keep things similar the library could only generate URL's but not send the request. Eg
I didn't really think seriously about the API. I think there are already quite a few Reporting API libraries where one can have a look for some ideas for a good API
The text was updated successfully, but these errors were encountered: