curl --request GET \
--url https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"metric": {
"key": "LCOV",
"name": "Line Coverage",
"description": "Percentage of lines covered by tests",
"category": "coverage",
"inverted": false,
"valueType": "percentage"
},
"dimensions": {},
"points": [
{
"timestamp": "2026-01-04T23:59:59Z",
"value": 78.9
},
{
"timestamp": "2026-01-11T23:59:59Z",
"value": 80.2
}
]
}
],
"meta": {
"from": "2025-12-29T00:00:00Z",
"to": "2026-01-09T12:00:00Z",
"interval": "week"
}
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}Get component metric series
Retrieve each metric’s history for a specific Component on the Project’s default branch as a time series over the requested window. Returns one series per metric — covering maintainability, reliability, security, size, coverage, and quality indicators — each with the metric’s descriptor and one value per interval; narrow the result with the metric and category query parameters. Available as JSON, newline-delimited JSON (application/x-ndjson), or CSV (text/csv) via the Accept header. Buckets are UTC-aligned and labeled with the inclusive end of each interval; a bucket with no measurement carries the most recent prior value forward, and the final bucket (the one containing to) may be labeled later than to — including the future for an interval still in progress — with its value reflecting only measurements within the window.
curl --request GET \
--url https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.qlty.sh/gh/{ownerKeyOrId}/projects/{projectKeyOrId}/components/{componentIdOrName}/metrics/series")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"metric": {
"key": "LCOV",
"name": "Line Coverage",
"description": "Percentage of lines covered by tests",
"category": "coverage",
"inverted": false,
"valueType": "percentage"
},
"dimensions": {},
"points": [
{
"timestamp": "2026-01-04T23:59:59Z",
"value": 78.9
},
{
"timestamp": "2026-01-11T23:59:59Z",
"value": 80.2
}
]
}
],
"meta": {
"from": "2025-12-29T00:00:00Z",
"to": "2026-01-09T12:00:00Z",
"interval": "week"
}
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}{
"errors": [
{
"status": "400",
"title": "Bad Request",
"detail": "The request was invalid."
}
]
}Authorizations
Generate an API token at https://qlty.sh/user/settings/tokens
Path Parameters
Query Parameters
Filter by metric key
Each metric key, with its name and what it measures:
CMPLX(Cognitive Complexity): Total cognitive complexity across all functionsDUP(Code Duplication): Percentage of duplicated linesMNT(Maintainability Rating): Letter grade based on technical debt ratioSEC(Security Rating): Overall security rating based on security vulnerabilitiesSIZE(Project Size): Overall project size classificationISS(Total Issues): Total number of code quality issues detectedSECI(Security Issues): Total number of security issues detectedSECIH(High-Severity Security Issues): Number of high-severity security issues detectedSECIM(Medium-Severity Security Issues): Number of medium-severity security issues detectedSECIL(Low-Severity Security Issues): Number of low-severity security issues detectedTDR(Technical Debt Ratio): Ratio of technical debt to total development costFILES(Files): Total number of files in the projectLOC(Lines of Code): Total number of lines of codeCOV(Coverage Rating): Letter grade based on test coverageLCOV(Line Coverage): Percentage of lines covered by testsCOVLINES(Covered Lines): Number of executable lines run by tests. Line Coverage is 100 × Covered Lines ÷ (Covered Lines + Missed Lines), or 100 when both are 0, reported to two decimal places. A percentage computed from these counts is more precise than Line Coverage.MISSLINES(Missed Lines): Number of executable lines not run by tests. Lines the coverage report marks as not executable count as neither covered nor missed.
CMPLX, DUP, MNT, SEC, SIZE, ISS, SECI, SECIH, SECIM, SECIL, TDR, FILES, LOC, COV, LCOV, COVLINES, MISSLINES