curl --request GET \
--url https://app.kosli.com/api/v2/repos/{org} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/repos/{org}"
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}', 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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/repos/{org}")
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{
"page": 123,
"per_page": 123,
"total_pages": 123,
"total_count": 123,
"repos": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"short_name": "<string>",
"provider": "github",
"repo_id": "<string>",
"vcs_instance": "<string>",
"namespace_path": [
"<string>"
],
"additional_info": {},
"description": "<string>",
"tags": {},
"_links": {}
}
],
"_links": {}
}{
"message": "Organization not found"
}List repos
List repos for an organization.
Repos are paginated.
- The response includes pagination information and the list of repos.
- The list of repos is sorted by the repo name; sort_direction selects the direction (asc = A–Z, the default; desc = Z–A).
- Optional filters: name (exact match), search (case-insensitive substring match on the name), provider (VCS provider), repo_id (external repo ID), vcs_instance (VCS host, exact match), namespace (namespace prefix), and tag (key or key:value, repeatable).
- name and search are mutually exclusive; providing both returns a 400.
- repo_id is the stronger identifier as names of repos can change. So if repo_id is provided, name is ignored.
Repos are captured when attestations include a reference to a repo. This happens automatically when using Kosli CLI v2.11.35 or higher.
curl --request GET \
--url https://app.kosli.com/api/v2/repos/{org} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/repos/{org}"
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}', 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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/repos/{org}")
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{
"page": 123,
"per_page": 123,
"total_pages": 123,
"total_count": 123,
"repos": [
{
"id": "<string>",
"name": "<string>",
"url": "<string>",
"short_name": "<string>",
"provider": "github",
"repo_id": "<string>",
"vcs_instance": "<string>",
"namespace_path": [
"<string>"
],
"additional_info": {},
"description": "<string>",
"tags": {},
"_links": {}
}
],
"_links": {}
}{
"message": "Organization not found"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
Page number
x >= 1Number of repos per page
1 <= x <= 50Filter by repo name (exact match). This is ignored if repo_id is provided. Returns empty list if no match. Mutually exclusive with search.
Filter by repo name (case-insensitive substring match). Mutually exclusive with name.
Filter by VCS provider (e.g. github, gitlab, bitbucket, azure-devops, circleci).
github, gitlab, bitbucket, bitbucket_cloud, bitbucket_dc, azure-devops, azure_devops_services, azure_devops_server, circleci, git, subversion Filter by external repo ID (exact match). Returns empty list if no match.
Filter by VCS instance/host (exact match), e.g. gitlab.company.com.
Filter by namespace prefix, as a '/'-separated path, e.g. platform/backend. Matches repos nested anywhere under that path.
Sort direction by repo name: asc (A–Z, default) or desc (Z–A).
asc, desc Filter by tag key or key:value. Can be repeated, e.g. tag=team or tag=team:security.