Actions8
- Issue Actions
- Measure Actions
- Project Actions
- Quality Gate Actions
Measure → Get Component
AI-generatedOverview
This node interacts with the SonarQube API to retrieve measures for a specified component within a project. It is useful for obtaining specific metric data about a project component, such as code quality metrics, technical debt, or other analysis results tracked by SonarQube. For example, a user can fetch metrics like code coverage or complexity for a given project key to monitor software quality.
Use Case Examples
- Fetch code coverage and complexity metrics for a project component identified by its key.
- Retrieve specific SonarQube metrics for a component to integrate quality data into a CI/CD pipeline.
Properties
| Name | Meaning |
|---|---|
| Component Key | The unique key identifying the project component for which measures are to be retrieved. |
| Metric Key Names or IDs | A list of metric keys or IDs specifying which metrics to retrieve for the component. |
| Additional Fields | Optional fields to specify branch name or pull request ID to filter the measures. |
Output
JSON
component- The component (project) key for which measures were retrieved.measures- The list of measures (metrics) retrieved for the component, including their values and details.
Dependencies
- Requires an API key credential for SonarQube API authentication.
Troubleshooting
- Ensure the component key is correct and exists in the SonarQube instance to avoid 'component not found' errors.
- Verify that the metric keys specified are valid and available in the SonarQube metrics list to prevent empty or error responses.
- Check network connectivity and API credentials if authentication or connection errors occur.
Links
- SonarQube Web API Documentation - Official documentation for SonarQube's Web API endpoints, including measures retrieval.