API question getPageUrl and getPageUrls


I’m trying to build a small list of Intranet pages with the linked statistic values. I try to use either gepPageUrl or getPageUrls.
I have the following problem: in piwik when I list all the pages for a site I have first 2 entries and when I click on + it opens more pages and informations.
But when I use the API getPageUrl, I only see the 2 items of the beginning. I cannot access all the other pages.
getPageUrls only allow access to the pages available in the getPageUrl list…

For one site (the Intranet portal) it works.

Any idea why I have this behaviour and what must be changed in order to have all the pages in the getPageUrl?


(Matthieu Aubry) #2

Sorry I dont undersatnd. What exactly is the problem?

Please put

  • Request API URL used
  • Output obtained
  • Output you expected


hello, here is more information, based on the printscreen in the original post





so only 2 results, as I have on the action - pages in Piwik. But actually they are more than 2 pages in this sites, as we can see in the second printscreen.
I expect 20 results

And thus if I use the getPageUrl with an existing page, who is not listed in the getPageUrls I have an empty result





(Matthieu Aubry) #4
  1. try &expanded=1 to return all data (or use the latest RC from Index of / and try &flat=1 )
  2. there is no page /adifi_project in the report so it will not work? there is /adifi/adifi-home/adifi-project you have to specify the full path to getPageUrl



thank you, that’s it. I need to specify the full path to access a single URL directly.

I have to change some part of my code to implement this, but I think I have what I need now.

thanks a lot for the answers.