Help with Matomo/Piwik API

Hello out there :slight_smile: I would be very pleased Sarkari Result if someone could help me with the Matomo/Piwik API. I want to display the Actions->Pages Pnr Status Tree as JSON or XML, but I don’t have a clue how to accomplish that.

Hi,

There are two very easy ways to find out how to accomplish this:

Go to Actions->Pages Tree and press the :export: button. You can then click on Show Export URL and it will show you the API call to get exactly this data:
https://matomo.example/index.php?date=today&expanded=1&filter_limit=100&format=JSON&idSite=1&method=Actions.getPageUrls&module=API&period=month&token_auth=THE_SECRET_TOKEN

Or you could take a look at https://developer.matomo.org/api-reference/reporting-api and look for the Actions.getPageUrls API.