# SonarCloud

> 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.

App · 31 actions. Web page: https://docs.lodol.com/docs/integrations/sonarcloud

## Actions

### Add issue comment

Comment on an issue. Returns the new comment's key.

**Inputs**

- Issue (`issue`, text, required): The issue's key, from 'Search issues' or an earlier step.
- Comment (`text`, text, required): The comment, in Markdown.

**Outputs**

- `comment` (object): The comment
- `issue` (object): The issue, with its comments

**Example output**

```json
{
  "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 (`issue`, text, required): The issue's key, from 'Search issues' or an earlier step.
- Assignee (`assignee`, text): The user's login, or _me for the token's user.
- Remove the assignee (`unassign`, true/false): Unassign the issue instead of assigning it.

**Outputs**

- `issue` (object): The issue afterwards

**Example output**

```json
{
  "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 (`issue`, text, required): The issue's key, from 'Search issues' or an earlier step.
- Change (`transition`, text, required): 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 (`comment`, text): A comment to add with the change.

**Outputs**

- `issue` (object): The issue afterwards
- `transition` (text): The change made

**Example output**

```json
{
  "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 (`comment`, text, required): The comment's key, from 'Add issue comment' or 'Get issue'.

**Outputs**

- `comment_key` (text): The comment deleted
- `deleted` (true/false): Always true once deleted
- `issue` (object): The issue afterwards

**Example output**

```json
{
  "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 (`comment`, text, required): The comment's key, from 'Add issue comment' or 'Get issue'.
- New comment (`text`, text, required): The new text, in Markdown.

**Outputs**

- `comment` (object): The comment
- `issue` (object): The issue, with its comments

**Example output**

```json
{
  "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_id`, text, required): The task's id, from 'List analysis tasks' or an analysis run.
- Include warnings (`include_warnings`, true/false): Return the task's warnings.

**Outputs**

- `task` (object): The task

**Example output**

```json
{
  "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**

- `user` (object): The connected user

**Example output**

```json
{
  "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 (`issue`, text, required): The issue's key, from 'Search issues' or an earlier step.

**Outputs**

- `comments` (list): Its comments
- `components` (list): The files and projects
- `issue` (object): The issue
- `transitions` (list): Transitions available now

**Example output**

```json
{
  "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 (`issue`, text, required): The issue's key, from 'Search issues' or an earlier step.

**Outputs**

- `changes` (list): The changes
- `count` (number): How many

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`component`, text, required): 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 (`metrics`, list): 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_metrics`, text): More metric keys, separated by commas, such as complexity. See 'List metrics'.
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Pull request (`pull_request`, text): Only this pull request, by its number or key from 'List pull requests'.

**Outputs**

- `by_metric` (object): Each metric's value by its key, such as coverage
- `component` (object): The component measured
- `measures` (list): The measures
- `metrics` (list): What each metric means

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`component`, text, required): 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 (`metrics`, list): 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_metrics`, text): More metric keys, separated by commas, such as complexity. See 'List metrics'.
- From (`from_date`, date): Only analyses on or after this date.
- To (`to_date`, date): Only analyses on or before this date.
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 1000. SonarCloud's default is 100. From 1 to 1000.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `measures` (list): Each metric's history
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text, required): The project. Pick one, or give its key from an earlier step.

**Outputs**

- `current` (object): The last task that finished
- `is_busy` (true/false): Whether a task is waiting or running
- `last_status` (text): How the last finished task ended, empty if none
- `queue` (list): Tasks waiting or running

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`component`, text, required): 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 (`branch`, text): Only this branch. Leave empty for the project's main branch.

**Outputs**

- `ancestors` (list): Its parents, nearest first
- `component` (object): The component

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text, required): The project. Pick one, or give its key from an earlier step.
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Pull request (`pull_request`, text): Only this pull request, by its number or key from 'List pull requests'.

**Outputs**

- `conditions` (list): Every condition and its result
- `failed_conditions` (list): Only the conditions that fail
- `ignored_conditions` (true/false): Whether some conditions were ignored
- `passed` (true/false): True when the status is OK
- `status` (text): OK, WARN, ERROR or NONE

**Example output**

```json
{
  "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 (`organization`, text, required): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Rule key (`rule_key`, text, required): The rule's key, such as python:S1192, from 'Search rules' or an issue's 'rule'.

**Outputs**

- `rule` (object): The rule

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text, required): The project. Pick one, or give its key from an earlier step.
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Event type (`category`, text): 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_date`, date): Only analyses on or after this date.
- To (`to_date`, date): Only analyses on or before this date.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 100. From 1 to 500.

**Outputs**

- `analyses` (list): The analyses
- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text): Only tasks for this project.
- Status (`statuses`, list): 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_after`, date and time): Only tasks submitted at or after this time.
- Finished before (`finished_before`, date and time): Only tasks that finished at or before this time.
- Only the latest per project (`only_latest`, true/false): Only each project's most recent finished task.
- Page size (`page_size`, number): How many to return, 1 to 1000. SonarCloud's default is 100. From 1 to 1000.

**Outputs**

- `count` (number): How many
- `tasks` (list): The tasks

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text, required): The project. Pick one, or give its key from an earlier step.

**Outputs**

- `branches` (list): The branches
- `count` (number): How many
- `main_branch` (text): The main branch's name

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`component`, text, required): 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 (`qualifiers`, list): Only these kinds of components. Leave empty for all. One or more of: `FIL` (Files), `DIR` (Directories), `UTS` (Test files), `TRK` (Projects).
- How deep (`strategy`, text): 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 (`search`, text): Only components whose name contains this text.
- Sort by (`sort_by`, text): What to sort by. One of: `name` (Name (default)), `path`, `qualifier` (Kind).
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 100. From 1 to 500.

**Outputs**

- `base_component` (object): The one listed under
- `components` (list): The components
- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`organization`, text, required): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text): Only tags used in this project.
- Search (`search`, text): Only tags containing this text.
- Page size (`page_size`, number): How many to return, 1 to 100. SonarCloud's default is 10. From 1 to 100.

**Outputs**

- `count` (number): How many
- `tags` (list): The tags

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`component`, text, required): 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 (`metrics`, list): 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_metrics`, text): More metric keys, separated by commas, such as complexity. See 'List metrics'.
- Kinds (`qualifiers`, list): Only these kinds of components. Leave empty for all. One or more of: `FIL` (Files), `DIR` (Directories), `UTS` (Test files), `TRK` (Projects).
- How deep (`strategy`, text): 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 (`search`, text): Only components whose name contains this text.
- Sort by metric (`sort_by_metric`, text): Sort by this metric, which must be one of the metrics above.
- Highest first (`descending`, true/false): Sort from highest to lowest.
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 100. From 1 to 500.

**Outputs**

- `base_component` (object): The one listed under
- `components` (list): The components with their measures
- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 100. From 1 to 500.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `metrics` (list): The metrics
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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_only`, true/false): Only organizations you belong to. Turn off to list every public one.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 100. SonarCloud's default is 100. From 1 to 100.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `organizations` (list): The organizations
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`organization`, text, required): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Search (`search`, text): Only projects whose name or key contains this text.
- Last analyzed before (`analyzed_before`, date): Only projects whose last analysis is older than this date, to find stale projects.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 100. From 1 to 500.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `projects` (list): The projects
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text, required): The project. Pick one, or give its key from an earlier step.

**Outputs**

- `count` (number): How many
- `pull_requests` (list): The pull requests

**Example output**

```json
{
  "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 (`organization`, text, required): The SonarCloud organization. Pick one, or give its key from an earlier step.

**Outputs**

- `count` (number): How many
- `default_id` (text): The default gate's id
- `quality_gates` (list): The quality gates

**Example output**

```json
{
  "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 (`organization`, text, required): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Language (`language`, text): Only this programming language.
- Project (`project`, text): Only the profiles this project uses.
- Only defaults (`defaults_only`, true/false): Only the default profile for each language.

**Outputs**

- `count` (number): How many
- `profiles` (list): The quality profiles

**Example output**

```json
{
  "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 (`organization`, text, required): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text): Only issues in this project.
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Pull request (`pull_request`, text): Only this pull request, by its number or key from 'List pull requests'.
- Status (`issue_statuses`, list): Only issues in these statuses. Leave empty for all. One or more of: `OPEN`, `CONFIRMED`, `FALSE_POSITIVE` (False positive), `ACCEPTED`, `FIXED`.
- Resolution (`resolution`, text): Only unresolved issues, or only resolved ones. Leave empty for both. One of: `unresolved` (Unresolved only), `resolved` (Resolved only).
- Assignment (`assignment`, text): Only assigned or only unassigned issues. Leave empty for both. One of: `assigned`, `unassigned`.
- Assigned to me (`assigned_to_me`, true/false): Only issues assigned to the token's user.
- Assigned to (`assignees`, text): Only issues assigned to these logins, separated by commas.
- Quality affected (`software_qualities`, list): Only issues affecting these software qualities. One or more of: `MAINTAINABILITY`, `RELIABILITY`, `SECURITY`.
- Impact (`impact_severities`, list): Only issues with these impact levels. One or more of: `INFO`, `LOW`, `MEDIUM`, `HIGH`, `BLOCKER`.
- Clean code category (`clean_code_categories`, list): Only issues in these clean code categories. One or more of: `ADAPTABLE`, `CONSISTENT`, `INTENTIONAL`, `RESPONSIBLE`.
- Tags (`tags`, text): Only issues with any of these tags, separated by commas.
- Rules (`rules`, text): Only issues from these rules, separated by commas, such as python:S1192.
- Created on or after (`created_after`, date): Only issues created on or after this date.
- Created on or before (`created_before`, date): Only issues created on or before this date.
- Sort by (`sort_by`, text): 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 (`descending`, true/false): Sort from last to first.
- Include comments (`include_comments`, true/false): Return each issue's comments.
- Include available changes (`include_transitions`, true/false): Return the transitions each issue can take now.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 50. From 1 to 500.

**Outputs**

- `components` (list): The files and projects they are in
- `count` (number): How many on this page
- `effort_total_minutes` (number): Total estimated fix time of all matches, in minutes
- `has_more` (true/false): Whether another page follows
- `issues` (list): The issues
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`organization`, text, required): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Search (`search`, text): Text to find in rule names and keys.
- Language (`language`, text): Only this programming language.
- Quality affected (`software_qualities`, list): Only rules about these software qualities. One or more of: `MAINTAINABILITY`, `RELIABILITY`, `SECURITY`.
- Impact (`impact_severities`, list): Only rules with these impact levels. One or more of: `INFO`, `LOW`, `MEDIUM`, `HIGH`, `BLOCKER`.
- Rule status (`statuses`, list): Only rules in these statuses. One or more of: `READY`, `BETA`, `DEPRECATED`.
- Tags (`tags`, text): Only rules with any of these tags, separated by commas.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 100. From 1 to 500.

**Outputs**

- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `rules` (list): The rules
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`organization`, text): The SonarCloud organization. Pick one, or give its key from an earlier step.
- Project (`project`, text, required): The project. Pick one, or give its key from an earlier step.
- Branch (`branch`, text): Only this branch. Leave empty for the project's main branch.
- Status (`status`, text): Only hotspots to review, or only reviewed ones. One of: `TO_REVIEW` (To review), `REVIEWED`.
- Review result (`resolution`, text): For reviewed hotspots, only those found safe or fixed. One of: `SAFE`, `FIXED`.
- Assigned to me (`only_mine`, true/false): Only hotspots assigned to the token's user.
- Only new code (`since_leak_period`, true/false): Only hotspots created in the new code period.
- Page (`page`, number): Which page to get, starting at 1. Use 'next_page' from an earlier page. At least 1.
- Page size (`page_size`, number): How many to return, 1 to 500. SonarCloud's default is 100. From 1 to 500.

**Outputs**

- `components` (list): The files they are in
- `count` (number): How many on this page
- `has_more` (true/false): Whether another page follows
- `hotspots` (list): The hotspots
- `next_page` (number): Pass as 'page' for the next page; 0 on the last one
- `page` (number): This page, starting at 1
- `page_size` (number): How many a page holds
- `total` (number): How many match in all

**Example output**

```json
{
  "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 (`issue`, text, required): The issue's key, from 'Search issues' or an earlier step.
- Tags (`tags`, text): The issue's new tags, separated by commas. They replace the current ones.
- Remove every tag (`clear_tags`, true/false): Remove all tags instead of setting them.

**Outputs**

- `issue` (object): The issue afterwards

**Example output**

```json
{
  "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"
  }
}
```
