sonarqube度量指标获取

通过api查询项目中类型为bug和vulnerability的问题数(只查询阻断/严重/主要级别)


【bug】

http://localhost:9000/api/issues/search?componentKeys=xx&resolved=false&types=BUG&severities=MAJOR,CRITICAL,BLOCKER&p=1&ps=1

【vulnerability】

http://localhost:9000/api/issues/search?componentKeys=xx&resolved=false&types=VULNERABILITY&severities=MAJOR,CRITICAL,BLOCKER&p=1&ps=1

因为我想要拿到的是最近一条数据,所以分页和条数指定1。关于参数,可以参考自己sonarqube平台web api

http://localhost:9000/web_api/api/issues   中GET api/issues/search请求Parametes中有详细描述

猜你喜欢

转载自blog.csdn.net/a910196454/article/details/106568463