curl --request GET \
--url https://app.kosli.com/api/v2/attestations/{org}/list_attestations_for_criteria \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/attestations/{org}/list_attestations_for_criteria"
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/attestations/{org}/list_attestations_for_criteria', 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/attestations/{org}/list_attestations_for_criteria",
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/attestations/{org}/list_attestations_for_criteria"
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/attestations/{org}/list_attestations_for_criteria")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/attestations/{org}/list_attestations_for_criteria")
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{
"ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6": [
{
"annotations": {
"key": "value"
},
"artifact_fingerprint": "089eeef9ef2ba07f142d93bb172eab3f23586b4cb40af75175ce140ab9a88c9a",
"attestation_id": "1234567890",
"attestation_name": "manual-test",
"attestation_type": "generic",
"created_at": 1750923680,
"description": "this is a glorious attestation",
"evidence_archive_fingerprint": "960421eb617fc0ff3183cdc406f4bbc6340f10bc12ac2a83cb9a203dc3be3fc1",
"evidence_archive_path": "/path/to/evidence.tar.gz",
"external_urls": {
"github": "https://github.com/org/repo/actions/123"
},
"git_commit_info": {
"author": "Jon Smith <jon@smith.com>",
"branch": "main",
"message": "adding glorious commit",
"sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6",
"timestamp": 1750923680,
"url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6"
},
"has_audit_package": true,
"html_url": "https://app.kosli.com/org/flow/trail/attestation",
"is_compliant": true,
"origin_url": "https://github.com/actions/123",
"reported_by": "Jon Smith",
"target_artifacts": [
"backend"
],
"user_data": {
"test_result": "passed"
}
}
]
}{
"description": ""
}List attestations for criteria
List attestations matching a search criteria within an organization.
This endpoint returns a dictionary mapping commit SHAs to lists of attestations. Each attestation contains metadata about compliance, timing, and type-specific data.
commit_list is required; it scopes the search to a specific set of commits.
attestation_type, attestation_name, and flow_name further narrow results
within that commit set but cannot be used on their own.
Usage Examples
Get all attestations for a list of commits
GET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6
Narrow by flow and attestation type
GET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&flow_name=production-flow&attestation_type=snyk
Narrow by attestation name
GET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_name=manual-test
Narrow by custom attestation type
GET /attestations/my-org/list_attestations_for_criteria?commit_list=ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6&attestation_type=custom:security-scan
curl --request GET \
--url https://app.kosli.com/api/v2/attestations/{org}/list_attestations_for_criteria \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.kosli.com/api/v2/attestations/{org}/list_attestations_for_criteria"
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/attestations/{org}/list_attestations_for_criteria', 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/attestations/{org}/list_attestations_for_criteria",
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/attestations/{org}/list_attestations_for_criteria"
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/attestations/{org}/list_attestations_for_criteria")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.kosli.com/api/v2/attestations/{org}/list_attestations_for_criteria")
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{
"ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6": [
{
"annotations": {
"key": "value"
},
"artifact_fingerprint": "089eeef9ef2ba07f142d93bb172eab3f23586b4cb40af75175ce140ab9a88c9a",
"attestation_id": "1234567890",
"attestation_name": "manual-test",
"attestation_type": "generic",
"created_at": 1750923680,
"description": "this is a glorious attestation",
"evidence_archive_fingerprint": "960421eb617fc0ff3183cdc406f4bbc6340f10bc12ac2a83cb9a203dc3be3fc1",
"evidence_archive_path": "/path/to/evidence.tar.gz",
"external_urls": {
"github": "https://github.com/org/repo/actions/123"
},
"git_commit_info": {
"author": "Jon Smith <jon@smith.com>",
"branch": "main",
"message": "adding glorious commit",
"sha1": "ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6",
"timestamp": 1750923680,
"url": "https://github.com/org/repo/commit/ae08fc6a5c963ae8dfaa0c27d8e5de9980d433b6"
},
"has_audit_package": true,
"html_url": "https://app.kosli.com/org/flow/trail/attestation",
"is_compliant": true,
"origin_url": "https://github.com/actions/123",
"reported_by": "Jon Smith",
"target_artifacts": [
"backend"
],
"user_data": {
"test_result": "passed"
}
}
]
}{
"description": ""
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Query Parameters
The flow name to search for attestations in
The commit list that the attestations are associated with
^[a-f0-9]{40}$The attestation name to search for
The attestation ID to search for. Not yet supported on this endpoint — currently ignored.
The attestation type to search for. Use built-in types (e.g., 'junit') or 'custom:' for custom types.
Response
Successfully retrieved attestations
Response model for listing attestations by commit.
This model represents a dictionary mapping commit SHAs to lists of attestations. Each attestation can be of different types (generic, junit, snyk, pull_request, jira, sonar, custom).