curl --request GET \
--url https://app.kosli.com/api/v2/repos/{org}/{repo}/deployment-statistics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-statistics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/repos/{org}/{repo}/deployment-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{
"start_ts": 123,
"end_ts": 123,
"environments": [
{
"env_name": "<string>",
"deployment_frequency": [
{
"deployed_at": 123
}
],
"lead_times": [
{
"lead_time_seconds": 123
}
]
}
],
"_links": {}
}{
"message": "Repo not found"
}Deployment frequency and lead-time statistics for a repo
Per-environment deployment-frequency and lead-time series for a repo,
identified by its internal id (the {repo} path segment).
Returns one entry per non-logical environment the repo has been deployed to
(respecting the env filter), each with its raw deployed_at and
lead_time_seconds series plus the shared window bounds. Daily bucketing,
median and percentiles 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/repos/{org}/{repo}/deployment-statistics \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-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/repos/{org}/{repo}/deployment-statistics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/repos/{org}/{repo}/deployment-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{
"start_ts": 123,
"end_ts": 123,
"environments": [
{
"env_name": "<string>",
"deployment_frequency": [
{
"deployed_at": 123
}
],
"lead_times": [
{
"lead_time_seconds": 123
}
]
}
],
"_links": {}
}{
"message": "Repo not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query Parameters
Filter by environment name. Repeat to select several; omit for all environments the repo has been deployed to.
Include deployments at or after this timestamp. Defaults to 28 days before end_ts
Include deployments at or before this timestamp. Defaults to now
Response
Successful Response
Per-environment deployment-frequency + lead-time series for a repo.
Returns one entry per environment the repo has been deployed to (respecting
the env filter), each carrying its raw deployed_at and lead_time_seconds
series plus the shared window bounds. One round trip replaces the current
per-card lazy-load.