How to upload source code via API and get get report back in response

How can i upload source code through SonarCloud API and get analysis done ? Is it possible? If yes, which method i should use ?

Yes, it is possible to upload source code and get analysis done through the SonarCloud API. SonarCloud provides a web API to access its functionalities from applications. The web services composing the web API are documented within SonarCloud, through the URL┬╣. You can also access the web API documentation from the top bar in Cloud by clicking the help button┬╣.

You can use user tokens to perform analyses or invoke web services. You can pass the token instead of your usual login. The token is sent via the login field of HTTP authentication, without any password┬╣.

For detailed information on user tokens and authentication, see User Accounts┬╣. Is there anything else you would like to know?

(1) web-api | SonarCloud Docs. web-api | SonarCloud Docs.
(2) Analyzing source code overview - SonarQube. Analyzing source code overview.
(3) SonarScanner for Azure DevOps | SonarCloud Docs. SonarScanner for Azure DevOps | SonarCloud Docs.

1 Like