Web services 如何在sonar REST api中获取父级度量的所有值

Web services 如何在sonar REST api中获取父级度量的所有值,web-services,rest,sonarqube,Web Services,Rest,Sonarqube,我能够使用以下java代码从sonar REST API获得项目(资源)列表 Sonar sonar = Sonar.create("wwww.example.com/sonar/api/resources?metrics=nloc"); ResourceQuery query = new ResourceQuery(); List resourceList = sonar.findAll(query); for(Resource resource : resourceList){ Syst

我能够使用以下java代码从sonar REST API获得项目(资源)列表

Sonar sonar = Sonar.create("wwww.example.com/sonar/api/resources?metrics=nloc");
ResourceQuery query = new ResourceQuery();
List resourceList = sonar.findAll(query);
for(Resource resource : resourceList){
  System.out.println(resource.getid()+":"+resource.getMetricIntValue("nloc"));
}
但这导致了

1001:null
1002:null
1003:null
1004:null

为什么代码值行返回空值?

显示值为
ncloc
metrics
参数,而不是
nloc
。我想你刚刚输入了一个错误。

有没有办法得到一个项目主要问题的总数?{timestap}'&pageSize=10000&severities=BLOCKER,CRITICAL,MAJOR给出了问题列表,但没有给出计数,响应限制为500。。