简体   繁体   中英

SonarQube - Is there an API to grab a part of analysis for all projects you have?

I want to be able to extract, for example, just the Technical Debt numbers out of my sonar instance for all the projects I have, and display them on a page.

Does Sonar provide an api that I can utilize and achieve this?

SonarQube lets you get exhaustive data using its Web API. Taking your example of project's measures:

Since SonarQube 5.4

Use api/measures Web API (see parameters in documentation ). Example for project postgresql :

Before SonarQube 5.4

Use api/resources Web API:

http://sonarqube_url/api/resources?resource=your_resource&metrics=metric_key

Listing metric keys

Use api/metrics/search (documented here ), see also Metric Definitions .

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