Must-share information (formatted with Markdown):
- which versions are you using (SonarQube, Scanner, Plugin, and any relevant extension) : Data Center Edition Version 9.9.1
- how is SonarQube deployed: On AWS VM
- what are you trying to achieve
I need SonarQube api to get json response like below for my internal application
Example:
{
“task”: {
“id”: “XXXXXXXXXXXXXXXXXXX”,
“type”: “REPORT”,
“componentId”: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”,
“componentKey”: “test-demo”,
“componentName”: “test-demo”,
“componentQualifier”: “TRK”,
“analysisId”: “xxxxxxxxxxxxxxxxxx”,
“status”: “SUCCESS”,
“submittedAt”: “2024-04-30T10:28:51+0000”,
“submitterLogin”: “karjagi-shivarajakumar-XXXXXX”,
“startedAt”: “2024-04-30T10:28:52+0000”,
“executedAt”: “2024-04-30T10:28:56+0000”,
“executionTimeMs”: 2794,
“logs”: false,
“hasScannerContext”: true,
“organization”: “default-organization”,
“branch”: “main”,
“branchType”: “BRANCH”,
“warningCount”: 0,
“critical”: 7,
“high”: 9,
“medium”: 235,
“low”: 958,
“warnings”:
}
}
I tried to hit SonarQube API (https://mycomapanyserver/api/ce/task?id=<task_id>) and got below json responace but here i am not getting security hotspot information (high, medium,low and warning) like above example response
{
“task”: {
“id”: “xxxxxxxxxxxxxxxx”,
“type”: “REPORT”,
“componentId”: “XXXXXXXXXXXXXXXX”,
“componentKey”: “test-demo”,
“componentName”: “test-demo”,
“componentQualifier”: “TRK”,
“analysisId”: “XXXXXXXXXXXXXXXXXXXX”,
“status”: “SUCCESS”,
“submittedAt”: “2024-04-30T10:28:51+0000”,
“submitterLogin”: “karjagi-shivarajakumar-XXXXXX”,
“startedAt”: “2024-04-30T10:28:52+0000”,
“executedAt”: “2024-04-30T10:28:56+0000”,
“executionTimeMs”: 3448,
“hasScannerContext”: true,
“branch”: “main”,
“branchType”: “BRANCH”,
“warningCount”: 1,
“warnings”: ,
“nodeName”: “sonarqube-sonarqube-dce-app-7f95c98884-dlhp4”
}
}
what is the specific api should i hit to get json response as shown in example response?
Do not share screenshots of logs – share the text itself (bonus points for being well-formatted)!