v3
latestOpenAPI 3.1.02026-07-311725107.3 KBMetrics
Get component metrics
Retrieve 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.
get/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics
Path parameters
ownerKeyOrIdstring required
Repository owner name (login) or workspace ID
Example:acme-corp
Repository owner name (login) or workspace ID
projectKeyOrIdstring required
Repository name or project ID
Example:my-repo
Repository name or project ID
componentIdOrNamestring required
Component ID or name
Example:backend-api
Component ID or name
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"
}
]
}