把别的组的sonar接过来了,研究了下表结构,发现每次扫描都会得到一个taskID, 根据taskID可以获取到这次的扫描结果。
http://我是分割线:9001/sonar/api/ce/task?id=AWz1AKuPVBaur8uq_Mc2
{
"task":{
"id":"AWz1AKuPVBaur8uq_Mc2", //本次扫描ID
"type":"REPORT",
"componentId":"AWz1AKsvVBaur8uq_Mcw", //扫描项目的ID
"componentKey":"UKE-uke-lecture", //扫描项目的key
"componentName":"UKE-uke-lecture", //扫描项目的name
"componentQualifier":"TRK",
"analysisId":"AWz1AK8HOiQwAZqhrRhY", //分析结果ID
"status":"SUCCESS",
"submittedAt":"2019-09-03T10:42:37+0800",
"submitterLogin":"admin",
"startedAt":"2019-09-03T10:42:38+0800",
"executedAt":"2019-09-03T10:42:45+0800",
"executionTimeMs":7167,
"logs":false,
"hasScannerContext":true,
"organization":"default-organization"
}
}