Metrics

Get file metrics

Retrieve the latest values of all metrics for a file in a Project's default branch

get/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/files

Request

  • Base URL
    https://api.qlty.sh
  • Auth
    HTTP 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

Query parameters

pathstring required

File path to retrieve metrics for

Example:src/index.ts

Response

Retrieve metrics for a file

Example response

{
  "data": [
    {
      "key": "CMPLX",
      "name": "Cognitive Complexity",
      "description": "Measures how hard the code is to understand",
      "category": "maintainability",
      "inverted": true,
      "valueType": "number"
    }
  ]
}

Changes

No recorded changes to this operation across all 8 revisions of this API.