Find website or idSite from siteName

Hello,

Is posible for API find a site from SiteName?.

We have a tens of thousands websites in Matomo, get all Websites is not factible, only we wants find one websitsite for your siteName.

Hi,

I can’t seem to find an IP that does exactly that, but what is stopping you from calling SitesManager.getAllSites? Does it time out?

Otherwise you can also make SQL queries of course. That should be quite quick.

Hi,

Thanks for your quick response :wink:

With the SitesManager.getAllSites method, it only answers 100 websites out of thousands.

Hi,

You can add &filter_limit=-1 to the API request to get unlimited responses.

Hi,

Thanks :wink:

The response send 33989 websites, the time response is 28000 ms… is a lot of time.

That’s quite a lot of sites.

I’d say that unusual use cases allow unusual solutions. I think the cleanest solution is creating a simple plugin that adds the API endpoint you need.
Similar to


and