Skip to main content
GET
/
gh
/
{ownerKeyOrId}
/
projects
/
{projectKeyOrId}
/
metrics
Get project metrics
curl --request GET \
  --url https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/metrics \
  --header 'Authorization: Bearer <token>'
{
  "data": [
    {
      "key": "complexity",
      "name": "Cognitive Complexity",
      "description": "Measures the cognitive load required to understand the code",
      "category": "maintainability",
      "value": 15.7,
      "inverted": true
    },
    {
      "key": "coverage",
      "name": "Test Coverage",
      "description": "Percentage of code covered by tests",
      "category": "reliability",
      "value": 87.5,
      "inverted": false
    }
  ]
}

Authorizations

Authorization
string
header
required

Generate an API token at https://qlty.sh/user/settings/tokens

Path Parameters

ownerKeyOrId
string
required

The key or ID of the Workspace that owns the Project

projectKeyOrId
string
required

The key or ID of the Project to retrieve metrics for

Response

Successful response

data
object[]
required

List of Metric items returned in the response