수요일, 5월 29, 2024
HomeWindowsSonarQube Web API measures 목록가져오기

SonarQube Web API measures 목록가져오기

타 Front End Site에서 SunarQube Data를 가져와서 화면에 구현할 경우
measures 목록을 구해와서 보여줘야 할경우 사용하시면 됩니다.

 

호출 URL : http://localhost/sonarqube/api/measures/search

파라메터 : projectKeys=project:java_project&metricKeys=alert_status,bugs,reliability_rating,vulnerabilities,security_rating,code_smells,sqale_rating,duplicated_lines_density,coverage,ncloc,ncloc_language_distribution

실행예시 :

{
    "measures": [
        {
            "metric": "alert_status",
            "value": "ERROR",
            "component": "project:java_project"
        },
        {
            "metric": "bugs",
            "value": "82",
            "periods": [
                {
                    "index": 1,
                    "value": "0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "code_smells",
            "value": "14556",
            "periods": [
                {
                    "index": 1,
                    "value": "0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "coverage",
            "value": "0.0",
            "periods": [
                {
                    "index": 1,
                    "value": "0.0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "duplicated_lines_density",
            "value": "31.6",
            "periods": [
                {
                    "index": 1,
                    "value": "0.0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "ncloc",
            "value": "85189",
            "periods": [
                {
                    "index": 1,
                    "value": "0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "ncloc_language_distribution",
            "value": "java=85189",
            "component": "project:java_project"
        },
        {
            "metric": "reliability_rating",
            "value": "5.0",
            "periods": [
                {
                    "index": 1,
                    "value": "0.0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "security_rating",
            "value": "5.0",
            "periods": [
                {
                    "index": 1,
                    "value": "0.0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "sqale_rating",
            "value": "2.0",
            "periods": [
                {
                    "index": 1,
                    "value": "0.0"
                }
            ],
            "component": "project:java_project"
        },
        {
            "metric": "vulnerabilities",
            "value": "23",
            "periods": [
                {
                    "index": 1,
                    "value": "0"
                }
            ],
            "component": "project:java_project"
        }
    ]
}

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Time limit exceeded. Please complete the captcha once again.

Most Popular