curl --request GET \
--url https://api.example.com/api/v1/repositories/{repo_id}/ownership \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/repositories/{repo_id}/ownership"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/repositories/{repo_id}/ownership', 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://api.example.com/api/v1/repositories/{repo_id}/ownership",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.example.com/api/v1/repositories/{repo_id}/ownership"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/repositories/{repo_id}/ownership")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/repositories/{repo_id}/ownership")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"bus_factor": 123,
"contributors": [
{
"commit_count": 123,
"name": "<string>",
"share": 123,
"is_bot": false
}
],
"contributors_total": 123,
"human_author_count": 123,
"top_author_share": 123,
"computed_at": "2023-11-07T05:31:56Z",
"top_author": {
"name": "<string>",
"share": 123
},
"window": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Bus-factor signal + capped human contributors for one repo (spec §8).
Return the ownership signal for one repo, scoped to the latest scan of its org.
Contributors are humans only, ordered by commit_count DESC. Returns 200
with zeros / null / empty arrays when no signal exists yet (the feature flag
OWNERSHIP_SIGNAL_ENABLED is off, or the scan ran before backfill) — the
endpoint stays callable without agents needing a “flag-off” branch.
Paginated via limit / offset; X-Total-Count carries the full
human contributor count. Raw emails are never returned (PII contract).
curl --request GET \
--url https://api.example.com/api/v1/repositories/{repo_id}/ownership \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.example.com/api/v1/repositories/{repo_id}/ownership"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.example.com/api/v1/repositories/{repo_id}/ownership', 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://api.example.com/api/v1/repositories/{repo_id}/ownership",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$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://api.example.com/api/v1/repositories/{repo_id}/ownership"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/repositories/{repo_id}/ownership")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/repositories/{repo_id}/ownership")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"bus_factor": 123,
"contributors": [
{
"commit_count": 123,
"name": "<string>",
"share": 123,
"is_bot": false
}
],
"contributors_total": 123,
"human_author_count": 123,
"top_author_share": 123,
"computed_at": "2023-11-07T05:31:56Z",
"top_author": {
"name": "<string>",
"share": 123
},
"window": {
"end": "2023-11-07T05:31:56Z",
"start": "2023-11-07T05:31:56Z"
}
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
Headers
Path Parameters
Query Parameters
Maximum items to return.
1 <= x <= 500Items to skip.
x >= 0Cookies
Response
Successful Response
Per-repo ownership signal + capped human contributors (spec §8).
Returns the signal computed at the latest completed scan of the repo's
connected org. When no signal row exists yet (OWNERSHIP_SIGNAL_ENABLED
is off, or the scan ran before backfill), all numeric fields are 0,
top_author/window/computed_at are null, and contributors
is empty — endpoints stay callable so agents do not need to special-case
"ownership not enabled yet".
Show child attributes
Show child attributes
Name + share of the single top contributor (humans only).
Show child attributes
Show child attributes
The trailing window the signal was computed over.
Show child attributes
Show child attributes
