Skip to main content
GET
/
builds
/
{org}
/
statistics
Build frequency statistics
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

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

org
string
required

Query Parameters

repo_id
string | null

Filter by external VCS repo ID

repo_name
string | null

Filter by repo name (e.g. 'cyber-dojo/differ')

repo_inner_id
string | null

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.

start_ts
number | null

Include builds created at or after this timestamp. Defaults to 28 days before end_ts

end_ts
number | null

Include builds created at or before this timestamp. Defaults to now

Response

200 - application/json

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.

builds
BuildStatisticsItem · object[]
required
start_ts
number
required
end_ts
number
required
count
integer
required
Last modified on July 10, 2026