sonarqube的API接口(持续补充)
1.查看sonarqube的违规问题API
{sonar_url}/api/issues/search?componentKeys={project_key}
1-1如果要限制违规级别如下:
{sonar_url}/api/issues/search?componentKeys={project_key}&severities=BLOCKER,CRITICAL
1-2如果设置每页展示的数量和页码(只支持每页500条,20页的数据展示),p表示第几页,ps表示每页展示数据
{sonar_url}/api/issues/search?componentKeys={project_key}&p=1&ps=500
2.获取质量阈的API
{sonar_url}/api/qualitygates/project_status?projectKey=${PROJECT_KEY}
3.获取sonar规则的API
{sonar_url}/api/rules/search?languages=java
3-1获取规则中阻断严重规则
{sonar_url}/api/rules/search?languages=java&severities=BLOCKER,CRITICAL