albert17villar
albert17villar

Reputation: 101

How to upload a report to SonarQube properly using SonarQube API

I want to upload a json report made in R using lintr package to my SonarQube server. I'm making a POST taking advantage of the api/ce/submit command (You can find it in https://next.sonarqube.com/sonarqube/web_api/api/ce?internal=true). To do this i'm using Postman with this params:

  1. projectKey: XX
  2. projectName: XXname
  3. report: lintr_out.json
  4. projectBranch: testing-1.0

This command create the Project in Sonar but it's not able to show the information of the report. This is the result of the submit in SonarQube

Anybody knows how can i see the results of the report in Sonar properly? Thanks for all!

Upvotes: 3

Views: 1814

Answers (1)

The WS api/ce is for internal use (as marked). It is not an API and the report it expect may change its format anytime.

To submit issues based on a third party linter, I advice you look at the generic issue import feature. You simply have to convert your JSON file to the format we expect.

Upvotes: 2

Related Questions