curl --request GET \
--url https://app.kosli.com/api/v2/builds/{org}/statistics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/builds/{org}/statistics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kosli.com/api/v2/builds/{org}/statistics', 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://app.kosli.com/api/v2/builds/{org}/statistics",
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://app.kosli.com/api/v2/builds/{org}/statistics"
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://app.kosli.com/api/v2/builds/{org}/statistics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/builds/{org}/statistics")
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{
"builds": [
{
"created_at": 123
}
],
"start_ts": 123,
"end_ts": 123,
"count": 123,
"_links": {}
}Build frequency statistics
Build-frequency series for a repo within a time window.
Returns one timestamp per build (deduplicated by fingerprint) plus the resolved window bounds and a count. Daily bucketing and the median are computed client-side.
- end_ts defaults to now.
- start_ts defaults to 28 days before end_ts.
curl --request GET \
--url https://app.kosli.com/api/v2/builds/{org}/statistics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/builds/{org}/statistics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.kosli.com/api/v2/builds/{org}/statistics', 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://app.kosli.com/api/v2/builds/{org}/statistics",
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://app.kosli.com/api/v2/builds/{org}/statistics"
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://app.kosli.com/api/v2/builds/{org}/statistics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/builds/{org}/statistics")
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{
"builds": [
{
"created_at": 123
}
],
"start_ts": 123,
"end_ts": 123,
"count": 123,
"_links": {}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Filter by external VCS repo ID
Filter by repo name (e.g. 'cyber-dojo/differ')
Filter by the repo's internal id (the id in the repo response). The stable identifier: unaffected by repo renames or a missing external VCS id.
Include builds created at or after this timestamp. Defaults to 28 days before end_ts
Include builds created at or before this timestamp. Defaults to now
Response
Successful Response
Raw build-frequency series for the repo Build tab's chart.
The daily bucketing and median are computed client-side, so this returns only the per-build timestamps in the window plus the window bounds and a count. The series is deduplicated by fingerprint (one entry per build), matching the builds list's total_count over the same window.