curl --request PUT \
--url https://sreagent.app/api/v1/config/repo_settings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alerting_sns_topic_arn": "<string>",
"auto_dispatch": true,
"branch": "<string>",
"ci_fallback_to_platform": true,
"environment": "<string>",
"fix_runner": "<string>",
"path_prefix": "<string>",
"service": "<string>",
"writable_extensions": [
"<string>"
]
}
'import requests
url = "https://sreagent.app/api/v1/config/repo_settings/{id}"
payload = {
"alerting_sns_topic_arn": "<string>",
"auto_dispatch": True,
"branch": "<string>",
"ci_fallback_to_platform": True,
"environment": "<string>",
"fix_runner": "<string>",
"path_prefix": "<string>",
"service": "<string>",
"writable_extensions": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alerting_sns_topic_arn: '<string>',
auto_dispatch: true,
branch: '<string>',
ci_fallback_to_platform: true,
environment: '<string>',
fix_runner: '<string>',
path_prefix: '<string>',
service: '<string>',
writable_extensions: ['<string>']
})
};
fetch('https://sreagent.app/api/v1/config/repo_settings/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'alerting_sns_topic_arn' => '<string>',
'auto_dispatch' => true,
'branch' => '<string>',
'ci_fallback_to_platform' => true,
'environment' => '<string>',
'fix_runner' => '<string>',
'path_prefix' => '<string>',
'service' => '<string>',
'writable_extensions' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sreagent.app/api/v1/config/repo_settings/{id}"
payload := strings.NewReader("{\n \"alerting_sns_topic_arn\": \"<string>\",\n \"auto_dispatch\": true,\n \"branch\": \"<string>\",\n \"ci_fallback_to_platform\": true,\n \"environment\": \"<string>\",\n \"fix_runner\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"service\": \"<string>\",\n \"writable_extensions\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sreagent.app/api/v1/config/repo_settings/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alerting_sns_topic_arn\": \"<string>\",\n \"auto_dispatch\": true,\n \"branch\": \"<string>\",\n \"ci_fallback_to_platform\": true,\n \"environment\": \"<string>\",\n \"fix_runner\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"service\": \"<string>\",\n \"writable_extensions\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/repo_settings/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alerting_sns_topic_arn\": \"<string>\",\n \"auto_dispatch\": true,\n \"branch\": \"<string>\",\n \"ci_fallback_to_platform\": true,\n \"environment\": \"<string>\",\n \"fix_runner\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"service\": \"<string>\",\n \"writable_extensions\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Update a repo setting
Change one repository settings row, named by the id list_repo_settings reports. Only the fields you send change, so sending fix_runner on its own is legal; a field sent as null is cleared (a null branch makes the row the all-branches row, a null service removes the alias). The repository itself cannot be changed here: a row for another repository is a create. Answers the repository in the shape list_repo_settings answers.
curl --request PUT \
--url https://sreagent.app/api/v1/config/repo_settings/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alerting_sns_topic_arn": "<string>",
"auto_dispatch": true,
"branch": "<string>",
"ci_fallback_to_platform": true,
"environment": "<string>",
"fix_runner": "<string>",
"path_prefix": "<string>",
"service": "<string>",
"writable_extensions": [
"<string>"
]
}
'import requests
url = "https://sreagent.app/api/v1/config/repo_settings/{id}"
payload = {
"alerting_sns_topic_arn": "<string>",
"auto_dispatch": True,
"branch": "<string>",
"ci_fallback_to_platform": True,
"environment": "<string>",
"fix_runner": "<string>",
"path_prefix": "<string>",
"service": "<string>",
"writable_extensions": ["<string>"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alerting_sns_topic_arn: '<string>',
auto_dispatch: true,
branch: '<string>',
ci_fallback_to_platform: true,
environment: '<string>',
fix_runner: '<string>',
path_prefix: '<string>',
service: '<string>',
writable_extensions: ['<string>']
})
};
fetch('https://sreagent.app/api/v1/config/repo_settings/{id}', 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/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'alerting_sns_topic_arn' => '<string>',
'auto_dispatch' => true,
'branch' => '<string>',
'ci_fallback_to_platform' => true,
'environment' => '<string>',
'fix_runner' => '<string>',
'path_prefix' => '<string>',
'service' => '<string>',
'writable_extensions' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sreagent.app/api/v1/config/repo_settings/{id}"
payload := strings.NewReader("{\n \"alerting_sns_topic_arn\": \"<string>\",\n \"auto_dispatch\": true,\n \"branch\": \"<string>\",\n \"ci_fallback_to_platform\": true,\n \"environment\": \"<string>\",\n \"fix_runner\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"service\": \"<string>\",\n \"writable_extensions\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://sreagent.app/api/v1/config/repo_settings/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"alerting_sns_topic_arn\": \"<string>\",\n \"auto_dispatch\": true,\n \"branch\": \"<string>\",\n \"ci_fallback_to_platform\": true,\n \"environment\": \"<string>\",\n \"fix_runner\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"service\": \"<string>\",\n \"writable_extensions\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sreagent.app/api/v1/config/repo_settings/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"alerting_sns_topic_arn\": \"<string>\",\n \"auto_dispatch\": true,\n \"branch\": \"<string>\",\n \"ci_fallback_to_platform\": true,\n \"environment\": \"<string>\",\n \"fix_runner\": \"<string>\",\n \"path_prefix\": \"<string>\",\n \"service\": \"<string>\",\n \"writable_extensions\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"error": "<string>",
"message": "<string>"
}Authorizations
An sre_ak_* API key holding the api:admin scope (or api:config_read, which every write refuses with read_only_key).
Path Parameters
The resource's id.
Body
The SNS topic ARN an "Alarm on this" pull request for this repository should name in a generated alarm's alarm_actions, when one already exists for this repository's AWS account and region. Left unset, that pull request creates its own topic and subscription the first time and reuses it (by name) after that.
true (the default) sends this repository's fix requests to its runner as soon as they are made. false waits for a person: every request, from any endpoint (the webhook included), is created and its card says it is waiting, but nothing is sent until someone presses Send on the card (or, for a request with no card, in its Control Tower drawer). Applies to the whole repository.
The branch this row applies to. Leave it out (or send null) for the all-branches row, which is what a repository with one fence wants.
For a repository on "opencode_ci": when no CI run starts within 5 minutes of the handover, send the same request to SRE Agent's own agent once, instead of failing it. false (the default) fails it, naming the likely causes. Applies to the whole repository.
The environment this row describes, e.g. production. Optional.
Who executes this repository's fix requests: platform, opencode_ci, self_hosted. "platform" is SRE Agent's own agent and needs nothing installed. "opencode_ci" runs the fix in a GitHub Actions workflow in your repository and needs a plan that includes it. "self_hosted" runs the fix on a runner you register for this organization and needs a plan that includes it. The value applies to the whole repository, so it moves every row the repository has.
The one directory a proposed fix may write in, e.g. "terraform/", or "." for the whole repository. Left out, it is detected from the repository's layout the first time a fix runs and recorded here. A leading slash matches nothing, and .github/ is never writable whatever this says.
The alias SLIs, deploy events and fix requests may name this repository by. Optional: with no alias the repository's short name is used.
The file suffixes a proposed fix may touch, each starting with a dot (".tf", ".tfvars.json"). Defaults to .tf, .tfvars, .yaml, .yml. At least one is required when the field is sent.
Response
Updated.

