Not all apps (aka "Sites") getting retrieved by API

I am trying to get the sites (apps) via the Piwik HTTP API as documented here:

However it does not return all the sites, no matter what my offset or limit or manage parameters are. I always get only a list of 17 sites.
See the request and response below.

For example, I created a new site “z Lukas Testing”, and it does not appear. But there are also older sites which do not get returned. Do the sites have to have recent data to appear in the response?

This is blocking me. And yes, I have owner rights to the account and the sites I am missing.

Hi,

can you provide the parameters you use (if any?) I just queried /api/apps/v2 with different sets of parameters in several accounts and did not experience any surprising results.

best,
Markus

Thanks again, Dr. Baersch.
I have tried with no parameters, permission = “view”, permission = “manage”, limit = 100, offset & limit combined, no change.
In the screenshot above I used

.../api/apps/v2?permission=view&limit=200

But only 17 sites were returned. The account has a lot of sites (over 20), was that the case for your tests?

Must be an individual problem then. I have up to 90 sites in one account and all are visible on that endpoint.

1 Like

Ok, if I don’t get an answer from Piwik Pro here until tomorrow night, I will raise a bug.

Ok Bug ticket raised… Let’s hope this gets solved quickly, I am completely blocked.

Now very interesting, I created a new client key and secret and with that one, I am able to get all 33 sites…

It seems your rights are “frozen” into the API Key at the moment you create it. So if you were just able to see 17 sites when the API Key was created, using the same key later will still work with those restricted rights.
I believe that when I created the original API Key last year, I did not have manage rights to all sites yet and was not an owner of the account yet, so even though I have these rights now, the API does not return all sites for me that I see in the interface.

Anyway, this seems highly unexpected to me.

1 Like