curl --request GET \
--url https://sreagent.app/api/v1/config/repo_settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://sreagent.app/api/v1/config/repo_settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sreagent.app/api/v1/config/repo_settings', 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://sreagent.app/api/v1/config/repo_settings",
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://sreagent.app/api/v1/config/repo_settings"
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://sreagent.app/api/v1/config/repo_settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/repo_settings")
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{
"data": [
{
"alerting_sns_topic_arn": "<string>",
"allow_ci_config": true,
"auto_dispatch": true,
"branch": "<string>",
"branches": "<array>",
"ci_fallback_to_platform": true,
"environment": "<string>",
"fix_runner": "<string>",
"id": "<string>",
"path_prefix": "<string>",
"path_prefixes": [
"<string>"
],
"repo": "<string>",
"service": "<string>",
"writable_extensions": [
"<string>"
]
}
],
"organization": {},
"truncated": true
}{
"error": "<string>",
"message": "<string>"
}List repo settings
List this organization’s per-repository fix settings: each row’s id, the branch it applies to (null means all branches), the service alias, the environment, and the write fence (directories and writable extensions, and allow_ci_config, which says whether fixes may change CI configuration inside those directories). Each repository also reports fix_runner, which says who executes its fix requests: “platform”, SRE Agent’s own agent, “opencode_ci”, your own CI (this organization’s GitHub Actions runners), or “self_hosted”, your own machine. The id is what update_repo_settings and delete_repo_settings address a row by; the runner is set with those tools or by an admin under Integrations, and both check that the repository’s workflow is set up for your own CI before saving “opencode_ci”. A repository with no settings is not listed: it is still targetable by a fix request, with an auto-detected fence and the platform runner. alerting_sns_topic_arn, when set, is the SNS topic an “Alarm on this” pull request for the repository reuses instead of creating one. auto_dispatch false means the repository waits for a person to press Send on a fix request (on its card, or in the Control Tower) before it is sent; ci_fallback_to_platform true means a request its CI never starts goes to SRE Agent’s own agent after 5 minutes.
curl --request GET \
--url https://sreagent.app/api/v1/config/repo_settings \
--header 'Authorization: Bearer <token>'import requests
url = "https://sreagent.app/api/v1/config/repo_settings"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://sreagent.app/api/v1/config/repo_settings', 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://sreagent.app/api/v1/config/repo_settings",
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://sreagent.app/api/v1/config/repo_settings"
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://sreagent.app/api/v1/config/repo_settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/repo_settings")
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{
"data": [
{
"alerting_sns_topic_arn": "<string>",
"allow_ci_config": true,
"auto_dispatch": true,
"branch": "<string>",
"branches": "<array>",
"ci_fallback_to_platform": true,
"environment": "<string>",
"fix_runner": "<string>",
"id": "<string>",
"path_prefix": "<string>",
"path_prefixes": [
"<string>"
],
"repo": "<string>",
"service": "<string>",
"writable_extensions": [
"<string>"
]
}
],
"organization": {},
"truncated": true
}{
"error": "<string>",
"message": "<string>"
}Was this page helpful?