1

In the SonarQube docs it says that componentKeys can be the following:

Comma-separated list of component keys. Retrieve issues associated to a specific list of components (and all its descendants). A component can be a portfolio, project, module, directory or file.

I want to get all the issues from components of a specific directory. I have tried to use the * wildcard like this:

http://localhost:9000/api/issues/search?componentKeys=projectkey:src/testcases/*

or

http://localhost:9000/api/issues/search?componentKeys=src/testcases/*

This doesn't seem to work, how can you search issues by a directory?

Lucas
  • 100
  • 12

2 Answers2

0

You can pass your projectKey name as ComponentKeys and pull all the issues from the project.

http://localhost:9000/api/issues/search?componentKeys=testproject
Djordje Nedovic
  • 559
  • 8
  • 20
S.Siva
  • 1,901
  • 4
  • 17
  • 22
0

You were very close. If you want to filter issues under src/testcases then you can use:

http://localhost:9000/api/issues/search?componentKeys=projectkey:src/testcases/%
Djordje Nedovic
  • 559
  • 8
  • 20
Marco Gouveia
  • 23
  • 2
  • 6