Unable to get more than 10,000 projects on sonarqube

Hey everyone!
I’m trying to fetch projects from sonarqube for an organization that owns more than 10,000 projects.
The problem is when I’m trying to fetch more than 10,000 projects I’m getting the following error:
‘Can return only the first 10000 results. 12500th result asked.’ with status code 400.
I’m using this route (filter only projects): /api/components/search
What can I do to get all projects?

Hey there.

GET api/components/search is backed by Elasticsearch, so it’s not possible to get more than 10,000 results.

A user with global administration privileges can use GET api/projects/search which directly accesses the database and return more than 10,0000 projects.