简体   繁体   中英

SonarQube API search issues with componentKeys by directory

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?

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

http://localhost:9000/api/issues/search?componentKeys=testproject

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM