SonarQube Cloud
Code quality and security: issues, hotspots and quality gates
Managed auth
Authentication
Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.
API key
Your users enter
- User tokenSecretRequired
- SonarQube URLOptionalHTTPS URL
Where to find them
- In sonarcloud.io (or sonarqube.us): your avatar → “My Account” → “Security”.
- In “Generate Tokens” give it a name and click “Generate”.
- Copy the token: it is shown only once. It acts with your permissions in all your organizations. With SonarQube Server it is created the same way (“My Account” → “Security”) and must be a “User token”; project analysis tokens do not work for queries.
Tools (3)
SonarQube Cloud API request
SONARQUBE_SEND_REQUESTAuthenticated call to the SonarQube Cloud API ({url}/api). Any endpoint of the API is allowed. Paths are relative to /api; in SonarQube Cloud almost all require organization=… or the project key. Examples: GET /organizations/search?member=true (your organizations), GET /projects/search?organization=…&ps=100, GET /issues/search?componentKeys={project}&resolved=false&impactSeverities=BLOCKER,HIGH&ps=100, GET /hotspots/search?projectKey={project}&status=TO_REVIEW, GET /measures/component?component={project}&metricKeys=alert_status,coverage,software_quality_security_issues, GET /project_branches/list?project={project}, GET /project_pull_requests/list?project={project}, GET /ce/activity?component={project}&ps=10 (latest analyses), GET /rules/show?key={rule}&organization=…, GET /sources/raw?key={project}:{file path}, POST /issues/do_transition as a form (issue=…&transition=accept, falsepositive or reopen), POST /issues/add_comment as a form (issue=…&text=…).
Required scopes
No scopes required
Input
SonarQube Cloud API request input Name Type Description methodstringHTTP methodOne of: GET,POST,PUT,PATCH,DELETEDefault:"GET"pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link) queryobjectQuery string parameters bodyunknownJSON body formobjectBody as application/x-www-form-urlencoded instead of JSON body_base64stringBinary body, base64 (at most 960000 characters) content_typestringContent-Type of body_base64 headersobjectExtra headers such as Accept. Authentication is added automatically. Issues
SONARQUBE_LIST_ISSUESOpen issues of a project (or of a whole organization), from most to least severe, with rule, message, file and line, impact (security, reliability or maintainability and its severity), status, author and date.
Required scopes
No scopes required
Input
Issues input Name Type Description projectstringProject key (GET /projects/search?organization=… lists them) organizationstringOrganization key; required if you do not specify the project qualitiesstring[]Only those affecting these qualities severitiesstring[]branchstringBranch (empty: the main one) pull_requeststringID of an analyzed pull request maxintegerDefault: 50pageintegerDefault: 1Quality status of a project
SONARQUBE_GET_QUALITY_STATUSQuality gate of a project (OK or ERROR and the failing conditions) and its key metrics: security, reliability and maintainability issues, new issues, security hotspots and percentage reviewed, ratings (A-E), coverage, duplication and lines of code.
Required scopes
No scopes required
Input
Quality status of a project input Name Type Description projectrequiredstringProject key branchstringBranch (empty: the main one) pull_requeststringID of an analyzed pull request

