Language filter in SonarQube component_tree url

255 Views Asked by At

The api api/measures/component_tree gives the list of components based on the provided input filters. Is there any parameter to provide the language so that the returned list only contains components of that language?

1

There are 1 best solutions below

2
On

No, currently you cannot filter on language.

You could do it like this:

  1. Find all potentially relevant components with api/measures/component_tree
  2. Use api/components/show to get the language of each of those
  3. Only take components, that are included in 1. and have your desired language in 2.