@hal.littel
To get SonarQube issues report via API, you can use the following steps:
- Authenticate to SonarQube API: Before accessing any data from SonarQube, you need to authenticate to the API. You can do this by providing the SonarQube username and password in the API request headers.
- Get project key: You will need the project key of the project for which you want to get the issues report. You can find the project key in the SonarQube dashboard under Project Settings.
- Make a GET request to the issues API endpoint: Use the project key to make a GET request to the issues API endpoint. The API endpoint for getting issues report is typically /api/issues/search, and you can pass query parameters such as componentKeys (project key) to filter the issues for a specific project.
- Parse the response: The API response will be in JSON format, containing information about each issue such as type, severity, rule, message, and more. You can parse this response to extract the relevant information for your report.
- Generate the report: Once you have extracted the necessary information from the API response, you can use it to generate a report in the format you desire, such as a CSV file, HTML document, or any other format.
By following these steps, you can effectively use the SonarQube API to get the issues report for a project.