Metrics
Get component metrics
Changed onRetrieve the latest value of every metric for a specific Component on the Project's default branch, covering maintainability, reliability, security, size, coverage, and quality indicators. meta says when the analysis and the coverage upload behind those values happened.
get/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics
Request
- Base URLhttps://api.qlty.sh
- AuthHTTP bearer
Path parameters
ownerKeyOrIdstring required
Repository owner name (login) or workspace ID
Example:acme-corp
projectKeyOrIdstring required
Repository name or project ID
Example:my-repo
componentIdOrNamestring required
Component ID or name
Example:backend-api
Response
Retrieve metrics for a component
Example response
{
"data": [
{
"key": "CMPLX",
"name": "Cognitive Complexity",
"description": "Measures how hard the code is to understand",
"category": "maintainability",
"inverted": true,
"valueType": "number"
}
],
"meta": {
"analyzedAt": "2026-01-09T12:00:00Z",
"coverageUploadedAt": "2026-01-09T12:04:31Z"
}
}Changes
- info
added the required property
to the response with the status
- info