REST API for CRUD

Hello,

We are using PIWIK and manually configured some clients sites and get the analytics report.
It is working fine.

We are developing an app and plan the functionality as

  1. create the Site,
  2. provide view access
  3. show the javascript code
  4. After placing the javascript on the client’s side they can view the dashboard in our application.

Is this possible to achieve these by API calling? Please advise.

Thanks,
Kannan T.N.

Hi,

In theory everything you can do in Matomo, you can also do with the API.

https://developer.matomo.org/api-reference/reporting-api

SitesManager.addSite

one of the many UsersManager APIs

SitesManager.getJavascriptTag

You can embed all widgets using the token_auth of the user.
https://demo.matomo.org/index.php?module=Widgetize&action=index&idSite=62&period=day&date=yesterday

Hi Lukas Winkler,

Thanks for your reply. I will explore these APIs and will integrate in to our application.

Thanks,
Kannan T.N.