SonarCloud
App · 31 actions
Work with SonarCloud code quality and security: find and triage issues, find security hotspots, check quality gates, read coverage and other measures, browse projects, branches and pull requests, and watch analyses.
Actions
| Action | What it does |
|---|---|
| Add issue comment | Comment on an issue. |
| Assign issue | Assign an issue to a user by login, to yourself with _me, or remove its assignee. |
| Change issue status | Move an issue through its workflow: confirm it, accept it, mark it a false positive or reopen it, with an optional comment. |
| Delete issue comment | Delete a comment you wrote on an issue. |
| Edit issue comment | Change the text of a comment you wrote on an issue. |
| Get analysis task | Get one analysis task: its status, timing and, if asked, its warnings. |
| Get current user | Get the SonarCloud user the token acts as: login, name, email and groups. |
| Get issue | Get one issue with its comments and the changes it can go through now. |
| Get issue history | List every change made to an issue: who changed what, and when. |
| Get measures | Get a project's (or file's) measures, such as coverage, bugs and lines of code. |
| Get measures history | Get how measures changed analysis by analysis, oldest first, to chart coverage or debt over time. |
| Get project analysis status | See whether a project has analyses waiting or running, and how the last one finished. |
| Get project or file | Get a project, directory or file by its key, with the projects above it. |
| Get quality gate status | Check whether a project, branch or pull request passes its quality gate, and which conditions fail. |
| Get rule | Get one coding rule with its description, impact and parameters. |
| List analyses | List a project's analyses, newest first, with the versions and events recorded on each. |
| List analysis tasks | List the background tasks that process analysis reports, newest first, to find failed or slow analyses. |
| List branches | List a project's branches with their quality gate status and issue counts. |
| List files | List the files and directories under a project or directory. |
| List issue tags | List the tags used on issues in an organization or project. |
| List measures by file | Get measures for each file or directory under a project, such as coverage per file, optionally sorted. |
| List metrics | List the metrics SonarCloud measures, with the keys 'Get measures' takes. |
| List organizations | List the SonarCloud organizations you belong to, with their keys. |
| List projects | List an organization's projects, optionally by name or by how long ago they were analyzed. |
| List pull requests | List a project's analyzed pull requests with their quality gate status. |
| List quality gates | List an organization's quality gates and say which is the default. |
| List quality profiles | List an organization's quality profiles (the rule sets analyses use), by language or project. |
| Search issues | Find issues (bugs, vulnerabilities and code smells) in an organization or project by status, impact, assignee, tag, rule or date. |
| Search rules | Search SonarCloud's coding rules by text, language, quality, impact, status or tag. |
| Search security hotspots | List a project's security hotspots, by whether they still need review. |
| Set issue tags | Replace an issue's tags with the ones given, or remove them all. |
Add issue comment
Comment on an issue. Returns the new comment's key.
Inputs
- Issue
issuetextRequired - The issue's key, from 'Search issues' or an earlier step.
- Comment
texttextRequired - The comment, in Markdown.
Outputs
commentobject- The comment
issueobject- The issue, with its comments
Example output
{
"comment": {
"createdAt": "2026-10-20T14:00:00+0000",
"htmlText": "Looking into it.",
"key": "AYcommentKey01",
"login": "jo@github",
"markdown": "Looking into it.",
"updatable": true
},
"issue": {
"assignee": "",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [
{
"createdAt": "2026-10-20T14:00:00+0000",
"htmlText": "Looking into it.",
"key": "AYcommentKey01",
"login": "jo@github",
"markdown": "Looking into it.",
"updatable": true
}
],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "OPEN",
"tags": [
"design"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
}
}Assign issue
Assign an issue to a user by login, to yourself with _me, or remove its assignee.
Inputs
- Issue
issuetextRequired - The issue's key, from 'Search issues' or an earlier step.
- Assignee
assigneetext - The user's login, or _me for the token's user.
- Remove the assignee
unassigntrue/false - Unassign the issue instead of assigning it.
Outputs
issueobject- The issue afterwards
Example output
{
"issue": {
"assignee": "jo@github",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "OPEN",
"tags": [
"design"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
}
}Change issue status
Move an issue through its workflow: confirm it, accept it, mark it a false positive or reopen it, with an optional comment. Accept, false positive and won't fix need the Administer Issues permission.
Inputs
- Issue
issuetextRequired - The issue's key, from 'Search issues' or an earlier step.
- Change
transitiontextRequired - What to do with the issue.One of:
confirm,unconfirm,reopen,accept(Accept (the team will live with it)),falsepositive(Mark as false positive),wontfix(Won't fix). - Comment
commenttext - A comment to add with the change.
Outputs
issueobject- The issue afterwards
transitiontext- The change made
Example output
{
"issue": {
"assignee": "",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "CONFIRMED",
"tags": [
"design"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
},
"transition": "confirm"
}Delete issue comment
Delete a comment you wrote on an issue.
Inputs
- Comment ID
commenttextRequired - The comment's key, from 'Add issue comment' or 'Get issue'.
Outputs
comment_keytext- The comment deleted
deletedtrue/false- Always true once deleted
issueobject- The issue afterwards
Example output
{
"comment_key": "AYcommentKey01",
"deleted": true,
"issue": {
"assignee": "",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "OPEN",
"tags": [
"design"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
}
}Edit issue comment
Change the text of a comment you wrote on an issue.
Inputs
- Comment ID
commenttextRequired - The comment's key, from 'Add issue comment' or 'Get issue'.
- New comment
texttextRequired - The new text, in Markdown.
Outputs
commentobject- The comment
issueobject- The issue, with its comments
Example output
{
"comment": {
"createdAt": "2026-10-20T14:00:00+0000",
"htmlText": "Looking into it.",
"key": "AYcommentKey01",
"login": "jo@github",
"markdown": "Looking into it.",
"updatable": true
},
"issue": {
"assignee": "",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [
{
"createdAt": "2026-10-20T14:00:00+0000",
"htmlText": "Looking into it.",
"key": "AYcommentKey01",
"login": "jo@github",
"markdown": "Looking into it.",
"updatable": true
}
],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "OPEN",
"tags": [
"design"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
}
}Get analysis task
Get one analysis task: its status, timing and, if asked, its warnings.
Inputs
- Task ID
task_idtextRequired - The task's id, from 'List analysis tasks' or an analysis run.
- Include warnings
include_warningstrue/false - Return the task's warnings.
Outputs
taskobject- The task
Example output
{
"task": {
"analysisId": "ae0bd1c2-1111-2222-3333-444455556666",
"branch": "",
"componentKey": "acme_web-app",
"componentName": "web-app",
"errorMessage": "",
"executedAt": "2026-10-20T14:00:09+0000",
"executionTimeMs": 8000,
"id": "AYtaskId00001",
"pullRequest": "",
"startedAt": "2026-10-20T14:00:01+0000",
"status": "SUCCESS",
"submittedAt": "2026-10-20T14:00:00+0000",
"type": "REPORT",
"warningCount": 0,
"warnings": []
}
}Get current user
Get the SonarCloud user the token acts as: login, name, email and groups.
Inputs
None.
Outputs
userobject- The connected user
Example output
{
"user": {
"avatar": "",
"email": "jo@example.com",
"externalIdentity": "",
"externalProvider": "",
"groups": [],
"isLoggedIn": true,
"login": "jo@github",
"name": "Jo Bloggs",
"scmAccounts": []
}
}Get issue
Get one issue with its comments and the changes it can go through now.
Inputs
- Issue
issuetextRequired - The issue's key, from 'Search issues' or an earlier step.
Outputs
commentslist- Its comments
componentslist- The files and projects
issueobject- The issue
transitionslist- Transitions available now
Example output
{
"comments": [],
"components": [
{
"analysisDate": "",
"description": "",
"key": "acme_web-app:src/index.ts",
"language": "ts",
"name": "index.ts",
"organization": "acme",
"path": "src/index.ts",
"qualifier": "FIL",
"tags": [],
"version": "",
"visibility": ""
}
],
"issue": {
"assignee": "",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "OPEN",
"tags": [
"design"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
},
"transitions": [
"confirm",
"accept",
"falsepositive"
]
}Get issue history
List every change made to an issue: who changed what, and when.
Inputs
- Issue
issuetextRequired - The issue's key, from 'Search issues' or an earlier step.
Outputs
changeslist- The changes
countnumber- How many
Example output
{
"changes": [
{
"creationDate": "2026-10-20T14:00:00+0000",
"diffs": [
{
"key": "status",
"newValue": "CONFIRMED",
"oldValue": "OPEN"
}
],
"isUserActive": false,
"user": "jo@github",
"userName": "Jo Bloggs"
}
],
"count": 1
}Get measures
Get a project's (or file's) measures, such as coverage, bugs and lines of code.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
componenttextRequired - The project. Pick one, or give a key from an earlier step: a project's key, or for one file or directory the project key, a colon, then the path.
- Metrics
metricslist - What to measure. If you choose none (and give no other metrics), quality gate status, lines of code, coverage, bugs, vulnerabilities and code smells are returned.One or more of:
alert_status(Quality gate status),ncloc(Lines of code),coverage,bugs,vulnerabilities,code_smells(Code smells),security_hotspots(Security hotspots),security_hotspots_reviewed(Security hotspots reviewed (%)),duplicated_lines_density(Duplicated lines (%)),violations(Open issues), and 9 more. - Other metrics
other_metricstext - More metric keys, separated by commas, such as complexity. See 'List metrics'.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Pull request
pull_requesttext - Only this pull request, by its number or key from 'List pull requests'.
Outputs
by_metricobject- Each metric's value by its key, such as coverage
componentobject- The component measured
measureslist- The measures
metricslist- What each metric means
Example output
{
"by_metric": {
"coverage": "87.5"
},
"component": {
"analysisDate": "",
"description": "",
"key": "acme_web-app",
"language": "",
"name": "web-app",
"organization": "acme",
"path": "",
"qualifier": "TRK",
"tags": [],
"version": "",
"visibility": "private"
},
"measures": [
{
"bestValue": false,
"metric": "coverage",
"period": {
"bestValue": false,
"value": ""
},
"value": "87.5"
}
],
"metrics": [
{
"description": "Coverage by tests",
"direction": 1,
"domain": "Coverage",
"hidden": false,
"key": "coverage",
"name": "Coverage",
"qualitative": true,
"type": "PERCENT"
}
]
}Get measures history
Get how measures changed analysis by analysis, oldest first, to chart coverage or debt over time.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
componenttextRequired - The project. Pick one, or give a key from an earlier step: a project's key, or for one file or directory the project key, a colon, then the path.
- Metrics
metricslist - What to measure. If you choose none (and give no other metrics), quality gate status, lines of code, coverage, bugs, vulnerabilities and code smells are returned.One or more of:
alert_status(Quality gate status),ncloc(Lines of code),coverage,bugs,vulnerabilities,code_smells(Code smells),security_hotspots(Security hotspots),security_hotspots_reviewed(Security hotspots reviewed (%)),duplicated_lines_density(Duplicated lines (%)),violations(Open issues), and 9 more. - Other metrics
other_metricstext - More metric keys, separated by commas, such as complexity. See 'List metrics'.
- From
from_datedate - Only analyses on or after this date.
- To
to_datedate - Only analyses on or before this date.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 1000. SonarCloud's default is 100.From 1 to 1000.
Outputs
countnumber- How many on this page
has_moretrue/false- Whether another page follows
measureslist- Each metric's history
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"count": 1,
"has_more": false,
"measures": [
{
"history": [
{
"date": "2026-10-01T09:00:00+0000",
"value": "85.0"
},
{
"date": "2026-10-20T14:00:00+0000",
"value": "87.5"
}
],
"metric": "coverage"
}
],
"next_page": 0,
"page": 1,
"page_size": 100,
"total": 1
}Get project analysis status
See whether a project has analyses waiting or running, and how the last one finished.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttextRequired - The project. Pick one, or give its key from an earlier step.
Outputs
currentobject- The last task that finished
is_busytrue/false- Whether a task is waiting or running
last_statustext- How the last finished task ended, empty if none
queuelist- Tasks waiting or running
Example output
{
"current": {
"analysisId": "ae0bd1c2-1111-2222-3333-444455556666",
"branch": "",
"componentKey": "acme_web-app",
"componentName": "web-app",
"errorMessage": "",
"executedAt": "2026-10-20T14:00:09+0000",
"executionTimeMs": 8000,
"id": "AYtaskId00001",
"pullRequest": "",
"startedAt": "2026-10-20T14:00:01+0000",
"status": "SUCCESS",
"submittedAt": "2026-10-20T14:00:00+0000",
"type": "REPORT",
"warningCount": 0,
"warnings": []
},
"is_busy": false,
"last_status": "SUCCESS",
"queue": []
}Get project or file
Get a project, directory or file by its key, with the projects above it.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
componenttextRequired - The project. Pick one, or give a key from an earlier step: a project's key, or for one file or directory the project key, a colon, then the path.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
Outputs
ancestorslist- Its parents, nearest first
componentobject- The component
Example output
{
"ancestors": [],
"component": {
"analysisDate": "",
"description": "",
"key": "acme_web-app",
"language": "",
"name": "web-app",
"organization": "acme",
"path": "",
"qualifier": "TRK",
"tags": [],
"version": "",
"visibility": "private"
}
}Get quality gate status
Check whether a project, branch or pull request passes its quality gate, and which conditions fail.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttextRequired - The project. Pick one, or give its key from an earlier step.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Pull request
pull_requesttext - Only this pull request, by its number or key from 'List pull requests'.
Outputs
conditionslist- Every condition and its result
failed_conditionslist- Only the conditions that fail
ignored_conditionstrue/false- Whether some conditions were ignored
passedtrue/false- True when the status is OK
statustext- OK, WARN, ERROR or NONE
Example output
{
"conditions": [
{
"actualValue": "2",
"comparator": "GT",
"errorThreshold": "0",
"metricKey": "new_violations",
"status": "ERROR"
}
],
"failed_conditions": [
{
"actualValue": "2",
"comparator": "GT",
"errorThreshold": "0",
"metricKey": "new_violations",
"status": "ERROR"
}
],
"ignored_conditions": false,
"passed": false,
"status": "ERROR"
}Get rule
Get one coding rule with its description, impact and parameters.
Inputs
- Organization
organizationtextRequired - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Rule key
rule_keytextRequired - The rule's key, such as python:S1192, from 'Search rules' or an issue's 'rule'.
Outputs
ruleobject- The rule
Example output
{
"rule": {
"cleanCodeAttribute": "",
"cleanCodeAttributeCategory": "",
"createdAt": "",
"descriptionSections": [],
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"isTemplate": false,
"key": "python:S1192",
"lang": "py",
"langName": "Python",
"name": "String literals should not be duplicated",
"params": [],
"repo": "python",
"severity": "CRITICAL",
"status": "READY",
"sysTags": [
"design"
],
"tags": [],
"type": "CODE_SMELL"
}
}List analyses
List a project's analyses, newest first, with the versions and events recorded on each.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttextRequired - The project. Pick one, or give its key from an earlier step.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Event type
categorytext - Only analyses with an event of this type.One of:
VERSION,QUALITY_GATE(Quality gate),QUALITY_PROFILE(Quality profile),DEFINITION_CHANGE(Definition change),OTHER. - From
from_datedate - Only analyses on or after this date.
- To
to_datedate - Only analyses on or before this date.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 100.From 1 to 500.
Outputs
analyseslist- The analyses
countnumber- How many on this page
has_moretrue/false- Whether another page follows
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"analyses": [
{
"date": "2026-10-20T14:00:00+0000",
"events": [
{
"category": "VERSION",
"key": "AYevent",
"name": "1.4.0"
}
],
"key": "AYanalysis0001",
"manualNewCodePeriodBaseline": false,
"projectVersion": "1.4.0",
"revision": "314d602"
}
],
"count": 1,
"has_more": false,
"next_page": 0,
"page": 1,
"page_size": 100,
"total": 1
}List analysis tasks
List the background tasks that process analysis reports, newest first, to find failed or slow analyses.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttext - Only tasks for this project.
- Status
statuseslist - Only tasks in these statuses. Defaults to finished ones (succeeded, failed, canceled).One or more of:
SUCCESS(Succeeded),FAILED,CANCELED,PENDING(Waiting),IN_PROGRESS(Running). - Submitted after
submitted_afterdate and time - Only tasks submitted at or after this time.
- Finished before
finished_beforedate and time - Only tasks that finished at or before this time.
- Only the latest per project
only_latesttrue/false - Only each project's most recent finished task.
- Page size
page_sizenumber - How many to return, 1 to 1000. SonarCloud's default is 100.From 1 to 1000.
Outputs
countnumber- How many
taskslist- The tasks
Example output
{
"count": 1,
"tasks": [
{
"analysisId": "ae0bd1c2-1111-2222-3333-444455556666",
"branch": "",
"componentKey": "acme_web-app",
"componentName": "web-app",
"errorMessage": "",
"executedAt": "2026-10-20T14:00:09+0000",
"executionTimeMs": 8000,
"id": "AYtaskId00001",
"pullRequest": "",
"startedAt": "2026-10-20T14:00:01+0000",
"status": "SUCCESS",
"submittedAt": "2026-10-20T14:00:00+0000",
"type": "REPORT",
"warningCount": 0,
"warnings": []
}
]
}List branches
List a project's branches with their quality gate status and issue counts.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttextRequired - The project. Pick one, or give its key from an earlier step.
Outputs
brancheslist- The branches
countnumber- How many
main_branchtext- The main branch's name
Example output
{
"branches": [
{
"analysisDate": "2026-10-20T14:00:00+0000",
"branchId": "",
"commit": {
"date": "",
"message": "",
"sha": ""
},
"isMain": true,
"name": "main",
"status": {
"bugs": 0,
"codeSmells": 12,
"qualityGateStatus": "OK",
"vulnerabilities": 0
},
"type": "LONG"
}
],
"count": 1,
"main_branch": "main"
}List files
List the files and directories under a project or directory.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
componenttextRequired - The project. Pick one, or give a key from an earlier step: a project's key, or for one file or directory the project key, a colon, then the path.
- Kinds
qualifierslist - Only these kinds of components. Leave empty for all.One or more of:
FIL(Files),DIR(Directories),UTS(Test files),TRK(Projects). - How deep
strategytext - Which components under the one above to include.One of:
all(Everything underneath (default)),children(Direct children only),leaves(Files only, at any depth). - Search
searchtext - Only components whose name contains this text.
- Sort by
sort_bytext - What to sort by.One of:
name(Name (default)),path,qualifier(Kind). - Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 100.From 1 to 500.
Outputs
base_componentobject- The one listed under
componentslist- The components
countnumber- How many on this page
has_moretrue/false- Whether another page follows
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"base_component": {
"analysisDate": "",
"description": "",
"key": "acme_web-app",
"language": "",
"name": "web-app",
"organization": "acme",
"path": "",
"qualifier": "TRK",
"tags": [],
"version": "",
"visibility": "private"
},
"components": [
{
"analysisDate": "",
"description": "",
"key": "acme_web-app:src/index.ts",
"language": "ts",
"name": "index.ts",
"organization": "acme",
"path": "src/index.ts",
"qualifier": "FIL",
"tags": [],
"version": "",
"visibility": ""
}
],
"count": 1,
"has_more": false,
"next_page": 0,
"page": 1,
"page_size": 100,
"total": 1
}List issue tags
List the tags used on issues in an organization or project.
Inputs
- Organization
organizationtextRequired - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttext - Only tags used in this project.
- Search
searchtext - Only tags containing this text.
- Page size
page_sizenumber - How many to return, 1 to 100. SonarCloud's default is 10.From 1 to 100.
Outputs
countnumber- How many
tagslist- The tags
Example output
{
"count": 2,
"tags": [
"design",
"security"
]
}List measures by file
Get measures for each file or directory under a project, such as coverage per file, optionally sorted.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
componenttextRequired - The project. Pick one, or give a key from an earlier step: a project's key, or for one file or directory the project key, a colon, then the path.
- Metrics
metricslist - What to measure. If you choose none (and give no other metrics), quality gate status, lines of code, coverage, bugs, vulnerabilities and code smells are returned.One or more of:
alert_status(Quality gate status),ncloc(Lines of code),coverage,bugs,vulnerabilities,code_smells(Code smells),security_hotspots(Security hotspots),security_hotspots_reviewed(Security hotspots reviewed (%)),duplicated_lines_density(Duplicated lines (%)),violations(Open issues), and 9 more. - Other metrics
other_metricstext - More metric keys, separated by commas, such as complexity. See 'List metrics'.
- Kinds
qualifierslist - Only these kinds of components. Leave empty for all.One or more of:
FIL(Files),DIR(Directories),UTS(Test files),TRK(Projects). - How deep
strategytext - Which components under the one above to include.One of:
all(Everything underneath (default)),children(Direct children only),leaves(Files only, at any depth). - Search
searchtext - Only components whose name contains this text.
- Sort by metric
sort_by_metrictext - Sort by this metric, which must be one of the metrics above.
- Highest first
descendingtrue/false - Sort from highest to lowest.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 100.From 1 to 500.
Outputs
base_componentobject- The one listed under
componentslist- The components with their measures
countnumber- How many on this page
has_moretrue/false- Whether another page follows
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"base_component": {
"analysisDate": "",
"description": "",
"key": "acme_web-app",
"language": "",
"name": "web-app",
"organization": "acme",
"path": "",
"qualifier": "TRK",
"tags": [],
"version": "",
"visibility": "private"
},
"components": [
{
"key": "acme_web-app:src/index.ts",
"language": "ts",
"measures": [
{
"bestValue": false,
"metric": "coverage",
"period": {
"bestValue": false,
"value": ""
},
"value": "87.5"
}
],
"name": "index.ts",
"path": "src/index.ts",
"qualifier": "FIL"
}
],
"count": 1,
"has_more": false,
"next_page": 0,
"page": 1,
"page_size": 100,
"total": 1
}List metrics
List the metrics SonarCloud measures, with the keys 'Get measures' takes.
Inputs
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 100.From 1 to 500.
Outputs
countnumber- How many on this page
has_moretrue/false- Whether another page follows
metricslist- The metrics
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"count": 1,
"has_more": false,
"metrics": [
{
"description": "Coverage by tests",
"direction": 1,
"domain": "Coverage",
"hidden": false,
"key": "coverage",
"name": "Coverage",
"qualitative": true,
"type": "PERCENT"
}
],
"next_page": 0,
"page": 1,
"page_size": 100,
"total": 1
}List organizations
List the SonarCloud organizations you belong to, with their keys.
Inputs
- Only mine
member_onlytrue/false - Only organizations you belong to. Turn off to list every public one.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 100. SonarCloud's default is 100.From 1 to 100.
Outputs
countnumber- How many on this page
has_moretrue/false- Whether another page follows
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
organizationslist- The organizations
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"count": 1,
"has_more": false,
"next_page": 0,
"organizations": [
{
"actions": {
"admin": true,
"delete": false,
"provision": true
},
"avatar": "",
"defaultLeakPeriod": "",
"defaultLeakPeriodType": "",
"description": "",
"key": "acme",
"name": "Acme",
"url": "https://acme.example.com"
}
],
"page": 1,
"page_size": 100,
"total": 1
}List projects
List an organization's projects, optionally by name or by how long ago they were analyzed.
Inputs
- Organization
organizationtextRequired - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Search
searchtext - Only projects whose name or key contains this text.
- Last analyzed before
analyzed_beforedate - Only projects whose last analysis is older than this date, to find stale projects.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 100.From 1 to 500.
Outputs
countnumber- How many on this page
has_moretrue/false- Whether another page follows
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
projectslist- The projects
totalnumber- How many match in all
Example output
{
"count": 1,
"has_more": false,
"next_page": 0,
"page": 1,
"page_size": 100,
"projects": [
{
"key": "acme_web-app",
"lastAnalysisDate": "2026-10-20T14:00:00+0000",
"name": "web-app",
"organization": "acme",
"qualifier": "TRK",
"revision": "",
"visibility": "private"
}
],
"total": 1
}List pull requests
List a project's analyzed pull requests with their quality gate status.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttextRequired - The project. Pick one, or give its key from an earlier step.
Outputs
countnumber- How many
pull_requestslist- The pull requests
Example output
{
"count": 1,
"pull_requests": [
{
"analysisDate": "2026-10-20T14:00:00+0000",
"base": "main",
"branch": "feature/retries",
"key": "42",
"status": {
"bugs": 1,
"codeSmells": 3,
"qualityGateStatus": "ERROR",
"vulnerabilities": 0
},
"target": "",
"title": "Add retries",
"url": ""
}
]
}List quality gates
List an organization's quality gates and say which is the default.
Inputs
- Organization
organizationtextRequired - The SonarCloud organization. Pick one, or give its key from an earlier step.
Outputs
countnumber- How many
default_idtext- The default gate's id
quality_gateslist- The quality gates
Example output
{
"count": 1,
"default_id": "101",
"quality_gates": [
{
"id": "101",
"isBuiltIn": true,
"isDefault": true,
"name": "Sonar way"
}
]
}List quality profiles
List an organization's quality profiles (the rule sets analyses use), by language or project.
Inputs
- Organization
organizationtextRequired - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Language
languagetext - Only this programming language.
- Project
projecttext - Only the profiles this project uses.
- Only defaults
defaults_onlytrue/false - Only the default profile for each language.
Outputs
countnumber- How many
profileslist- The quality profiles
Example output
{
"count": 1,
"profiles": [
{
"activeRuleCount": 250,
"isBuiltIn": true,
"isDefault": true,
"key": "AYprofile0001",
"language": "py",
"languageName": "Python",
"name": "Sonar way",
"parentKey": "",
"projectCount": 0
}
]
}Search issues
Find issues (bugs, vulnerabilities and code smells) in an organization or project by status, impact, assignee, tag, rule or date. Gets one page; for more, run it again with 'next_page'. SonarCloud returns at most the first 10,000.
Inputs
- Organization
organizationtextRequired - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttext - Only issues in this project.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Pull request
pull_requesttext - Only this pull request, by its number or key from 'List pull requests'.
- Status
issue_statuseslist - Only issues in these statuses. Leave empty for all.One or more of:
OPEN,CONFIRMED,FALSE_POSITIVE(False positive),ACCEPTED,FIXED. - Resolution
resolutiontext - Only unresolved issues, or only resolved ones. Leave empty for both.One of:
unresolved(Unresolved only),resolved(Resolved only). - Assignment
assignmenttext - Only assigned or only unassigned issues. Leave empty for both.One of:
assigned,unassigned. - Assigned to me
assigned_to_metrue/false - Only issues assigned to the token's user.
- Assigned to
assigneestext - Only issues assigned to these logins, separated by commas.
- Quality affected
software_qualitieslist - Only issues affecting these software qualities.One or more of:
MAINTAINABILITY,RELIABILITY,SECURITY. - Impact
impact_severitieslist - Only issues with these impact levels.One or more of:
INFO,LOW,MEDIUM,HIGH,BLOCKER. - Clean code category
clean_code_categorieslist - Only issues in these clean code categories.One or more of:
ADAPTABLE,CONSISTENT,INTENTIONAL,RESPONSIBLE. - Tags
tagstext - Only issues with any of these tags, separated by commas.
- Rules
rulestext - Only issues from these rules, separated by commas, such as python:S1192.
- Created on or after
created_afterdate - Only issues created on or after this date.
- Created on or before
created_beforedate - Only issues created on or before this date.
- Sort by
sort_bytext - What to sort by. Defaults to the order SonarCloud chooses.One of:
CREATION_DATE(Created),UPDATE_DATE(Last updated),CLOSE_DATE(Closed),SEVERITY,STATUS,FILE_LINE(File and line),ASSIGNEE. - Newest or highest first
descendingtrue/false - Sort from last to first.
- Include comments
include_commentstrue/false - Return each issue's comments.
- Include available changes
include_transitionstrue/false - Return the transitions each issue can take now.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 50.From 1 to 500.
Outputs
componentslist- The files and projects they are in
countnumber- How many on this page
effort_total_minutesnumber- Total estimated fix time of all matches, in minutes
has_moretrue/false- Whether another page follows
issueslist- The issues
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"components": [
{
"analysisDate": "",
"description": "",
"key": "acme_web-app:src/index.ts",
"language": "ts",
"name": "index.ts",
"organization": "acme",
"path": "src/index.ts",
"qualifier": "FIL",
"tags": [],
"version": "",
"visibility": ""
}
],
"count": 1,
"effort_total_minutes": 10,
"has_more": false,
"issues": [
{
"assignee": "",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "OPEN",
"tags": [
"design"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
}
],
"next_page": 0,
"page": 1,
"page_size": 50,
"total": 1
}Search rules
Search SonarCloud's coding rules by text, language, quality, impact, status or tag.
Inputs
- Organization
organizationtextRequired - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Search
searchtext - Text to find in rule names and keys.
- Language
languagetext - Only this programming language.
- Quality affected
software_qualitieslist - Only rules about these software qualities.One or more of:
MAINTAINABILITY,RELIABILITY,SECURITY. - Impact
impact_severitieslist - Only rules with these impact levels.One or more of:
INFO,LOW,MEDIUM,HIGH,BLOCKER. - Rule status
statuseslist - Only rules in these statuses.One or more of:
READY,BETA,DEPRECATED. - Tags
tagstext - Only rules with any of these tags, separated by commas.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 100.From 1 to 500.
Outputs
countnumber- How many on this page
has_moretrue/false- Whether another page follows
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
ruleslist- The rules
totalnumber- How many match in all
Example output
{
"count": 1,
"has_more": false,
"next_page": 0,
"page": 1,
"page_size": 100,
"rules": [
{
"cleanCodeAttribute": "",
"cleanCodeAttributeCategory": "",
"createdAt": "",
"descriptionSections": [],
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"isTemplate": false,
"key": "python:S1192",
"lang": "py",
"langName": "Python",
"name": "String literals should not be duplicated",
"params": [],
"repo": "python",
"severity": "CRITICAL",
"status": "READY",
"sysTags": [
"design"
],
"tags": [],
"type": "CODE_SMELL"
}
],
"total": 1
}Search security hotspots
List a project's security hotspots, by whether they still need review.
Inputs
- Organization
organizationtext - The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project
projecttextRequired - The project. Pick one, or give its key from an earlier step.
- Branch
branchtext - Only this branch. Leave empty for the project's main branch.
- Status
statustext - Only hotspots to review, or only reviewed ones.One of:
TO_REVIEW(To review),REVIEWED. - Review result
resolutiontext - For reviewed hotspots, only those found safe or fixed.One of:
SAFE,FIXED. - Assigned to me
only_minetrue/false - Only hotspots assigned to the token's user.
- Only new code
since_leak_periodtrue/false - Only hotspots created in the new code period.
- Page
pagenumber - Which page to get, starting at 1. Use 'next_page' from an earlier page.At least 1.
- Page size
page_sizenumber - How many to return, 1 to 500. SonarCloud's default is 100.From 1 to 500.
Outputs
componentslist- The files they are in
countnumber- How many on this page
has_moretrue/false- Whether another page follows
hotspotslist- The hotspots
next_pagenumber- Pass as 'page' for the next page; 0 on the last one
pagenumber- This page, starting at 1
page_sizenumber- How many a page holds
totalnumber- How many match in all
Example output
{
"components": [
{
"analysisDate": "",
"description": "",
"key": "acme_web-app:src/index.ts",
"language": "ts",
"name": "index.ts",
"organization": "acme",
"path": "src/index.ts",
"qualifier": "FIL",
"tags": [],
"version": "",
"visibility": ""
}
],
"count": 1,
"has_more": false,
"hotspots": [
{
"assignee": "",
"author": "",
"component": "acme_web-app:src/hash.ts",
"creationDate": "",
"key": "AYhotspotKey01",
"line": 17,
"message": "Make sure this weak hash algorithm is safe here.",
"project": "acme_web-app",
"resolution": "",
"ruleKey": "typescript:S4790",
"securityCategory": "weak-cryptography",
"status": "TO_REVIEW",
"updateDate": "",
"vulnerabilityProbability": "MEDIUM"
}
],
"next_page": 0,
"page": 1,
"page_size": 100,
"total": 1
}Set issue tags
Replace an issue's tags with the ones given, or remove them all.
Inputs
- Issue
issuetextRequired - The issue's key, from 'Search issues' or an earlier step.
- Tags
tagstext - The issue's new tags, separated by commas. They replace the current ones.
- Remove every tag
clear_tagstrue/false - Remove all tags instead of setting them.
Outputs
issueobject- The issue afterwards
Example output
{
"issue": {
"assignee": "",
"author": "",
"cleanCodeAttribute": "DISTINCT",
"cleanCodeAttributeCategory": "ADAPTABLE",
"closeDate": "",
"comments": [],
"component": "acme_web-app:src/index.ts",
"creationDate": "2026-10-01T09:00:00+0000",
"debt": "",
"effort": "10min",
"impacts": [
{
"severity": "HIGH",
"softwareQuality": "MAINTAINABILITY"
}
],
"issueStatus": "OPEN",
"key": "AYissueKey0001",
"line": 42,
"message": "Define a constant instead of duplicating this literal 3 times.",
"project": "acme_web-app",
"resolution": "",
"rule": "python:S1192",
"severity": "CRITICAL",
"status": "OPEN",
"tags": [
"design",
"needs-review"
],
"transitions": [
"confirm",
"accept",
"falsepositive"
],
"type": "CODE_SMELL",
"updateDate": "2026-10-20T14:00:00+0000"
}
}