SonarQube icon

SonarQube

Consume SonarQube and SonarCloud Web API

Actions8

Project → Search

AI-generated

Overview

This node interacts with the SonarQube and SonarCloud Web API to search for projects based on specified criteria. It allows users to search projects by name, qualifiers, and organization, and supports returning either all matching projects or a limited number of results. This is useful for users who want to programmatically retrieve project information from SonarQube or SonarCloud for analysis, reporting, or integration with other systems.

Use Case Examples

  1. Search for all projects containing 'my-project' in their name within a specific organization.
  2. Retrieve up to 50 projects with the qualifier 'TRK' from SonarCloud.

Properties

Name Meaning
Return All Whether to return all results or only up to a given limit.
Limit Maximum number of project results to return when 'Return All' is false.
Additional Fields Additional search parameters including query string to filter project names, qualifiers to specify component types, and organization key for SonarCloud.

Output

JSON

  • components - Array of project components matching the search criteria.
  • paging
    • total - Total number of projects matching the search criteria.
    • pageSize - Number of projects returned per page/request.
    • pageIndex - Current page index of the results.

Dependencies

  • Requires an API key credential for SonarQube or SonarCloud authentication.

Troubleshooting

  • Common issues include authentication failures due to invalid or missing API credentials. Ensure the SonarQube API key credential is correctly configured.
  • If no projects are returned, verify the query parameters such as 'Query', 'Qualifiers', and 'Organization' are correctly set and that the user has access to the specified organization or projects.
  • API rate limits or pagination issues may occur when returning all results; use the 'Return All' option carefully and consider limits to avoid timeouts or excessive data loads.

Links

Discussion