/api/components/search q parameter does not work

work with sonarqube 7.9 community version.

I have 21 sub-projects. got it by doing this:

need to get all the files in the big project.
when scanning using: /api/components/search?qualifiers=FIL
I get more then 10000 files. I understand the elastic search issue with more then 10000 items.
trying to overcome it using /api/components/search?qualifiers=FIL&q=project-name
and gets zero components.
it should work according to the doc.

How can I get all the files in my project?

Hey there.

Can I recommend you instead use GET api/components/tree instead?

  • This Web API is not backed by Elasticsearch, but instead a Database query. No limit of 10,000!
  • The ability to search for files on an instance globally (without first entering a project) will be removed in SonarQube v8.4
  • You won’t be relying on matching a specific query, but know you will only get results from a single project (using the component query parameter)


first look, it seems to work…
I will modify my code and update soon.
many thanks!!!