curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"build_on_default_branch_commit": true,
"contents": "<string>",
"position": 123,
"report_check_runs": true
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}"
payload = {
"build_on_default_branch_commit": True,
"contents": "<string>",
"position": 123,
"report_check_runs": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
build_on_default_branch_commit: true,
contents: '<string>',
position: 123,
report_check_runs: true
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_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://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'build_on_default_branch_commit' => true,
'contents' => '<string>',
'position' => 123,
'report_check_runs' => true
]),
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://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}"
payload := strings.NewReader("{\n \"build_on_default_branch_commit\": true,\n \"contents\": \"<string>\",\n \"position\": 123,\n \"report_check_runs\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"build_on_default_branch_commit\": true,\n \"contents\": \"<string>\",\n \"position\": 123,\n \"report_check_runs\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"build_on_default_branch_commit\": true,\n \"contents\": \"<string>\",\n \"position\": 123,\n \"report_check_runs\": true\n}"
response = http.request(request)
puts response.read_body{
"blueprint_id": "<string>",
"created_at": 123,
"repo_name": "<string>",
"type": "enterprise",
"updated_at": 123,
"build_on_default_branch_commit": true,
"report_check_runs": true,
"source": "git"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Inhalt, Position, Quelle und/oder Commit-Build-Einstellungen eines Blueprints aktualisieren
Partielles Update für einen einzelnen Blueprint. Löst NICHT automatisch einen Build aus.
Berücksichtigte Felder:
contents– schreibt eine neue YAML-Version für den Blueprint.position– legt die Ausführungsposition des Blueprints auf Repository-Ebene fest. Gibt bei einem Blueprint auf Org-Ebene400zurück (diese haben keine Position).source– schaltet das Repo zwischen den Modigitunddatabaseum. Nur für Blueprints im Repository-Stammverzeichnis auf Repository-Ebene.{"source": "database", "contents": ...}hebt die Git-Verknüpfung auf und übernimmtcontentsals neue (einzige) Version.build_on_default_branch_commit/report_check_runs– Commit-Builds pro Repo und die zugehörigen GitHub-Prüfläufe. Nur für Blueprints im Repository-Stammverzeichnis von github.com-Repos.
Gibt 400 zurück, wenn der Anfragebody leer ist.
curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"build_on_default_branch_commit": true,
"contents": "<string>",
"position": 123,
"report_check_runs": true
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}"
payload = {
"build_on_default_branch_commit": True,
"contents": "<string>",
"position": 123,
"report_check_runs": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
build_on_default_branch_commit: true,
contents: '<string>',
position: 123,
report_check_runs: true
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_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://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'build_on_default_branch_commit' => true,
'contents' => '<string>',
'position' => 123,
'report_check_runs' => true
]),
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://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}"
payload := strings.NewReader("{\n \"build_on_default_branch_commit\": true,\n \"contents\": \"<string>\",\n \"position\": 123,\n \"report_check_runs\": true\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"build_on_default_branch_commit\": true,\n \"contents\": \"<string>\",\n \"position\": 123,\n \"report_check_runs\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"build_on_default_branch_commit\": true,\n \"contents\": \"<string>\",\n \"position\": 123,\n \"report_check_runs\": true\n}"
response = http.request(request)
puts response.read_body{
"blueprint_id": "<string>",
"created_at": 123,
"repo_name": "<string>",
"type": "enterprise",
"updated_at": 123,
"build_on_default_branch_commit": true,
"report_check_runs": true,
"source": "git"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Berechtigungen
Erforderlich ist ein Service-Benutzer oder ein persönliches Zugriffstoken mit der BerechtigungManageRepoBlueprints auf Organisationsebene. Zum Erstellen oder Aktualisieren von Blueprints auf Org-Ebene ist die Berechtigung ManageOrgSnapshots erforderlich.
Verhalten
Aktualisiert den Inhalt und/oder die Position eines Blueprints. Ein Build wird nicht automatisch ausgelöst.Autorisierungen
Servicebenutzer-Anmeldedaten (Präfix: cog_)
Pfadparameter
Organisations-ID (Präfix: org-)
"org-abc123def456"
Body
Partielle Aktualisierung für einen Blueprint auf Organisations- oder Repository-Ebene.
Es kann jede beliebige Teilmenge von Feldern angegeben werden. Nicht gesetzte Felder bleiben unverändert.
Die Angabe von position, source oder einer Commit-Build-Einstellung bei einem
Blueprint auf Organisationsebene gibt 400 zurück — nur Blueprints auf Repository-Ebene haben diese Felder.
Löst KEINEN Build aus.
Falls gesetzt, aktiviert oder deaktiviert diese Einstellung den Build der Umgebung bei jedem Push auf den Standardbranch. Wird nur beim Blueprint im Repository-Stammverzeichnis eines github.com-Repos akzeptiert. Jeder solche Push fügt der Warteschlange einen Build hinzu.
Wenn gesetzt, ersetzt dies den YAML-Body des Blueprints durch eine neue Version.
Wenn gesetzt, aktualisiert dies die Ausführungsposition dieses Blueprints auf Repo-Ebene. Positionen müssen nicht eindeutig sein; Gleichstände werden beim Sortieren für die Ausführung vom Server beliebig aufgelöst.
Falls gesetzt, aktiviert oder deaktiviert diese Einstellung die Meldung jedes Commit-Builds als GitHub-Prüfdurchlauf. Zum Aktivieren muss 'build_on_default_branch_commit' aktiviert sein.
Wenn angegeben, wird die Blueprint-Quelle des Repos gewechselt. Nur beim Root-Blueprint des Repos zulässig (Blueprints mit eingeschränktem Geltungsbereich erhalten sie durch Vererbung). 'git' ruft .devin/blueprint.yaml vom Standardbranch ab (404, wenn die Datei fehlt) und kann nicht mit 'contents' kombiniert werden; 'database' behält das aktuelle YAML (oder 'contents', falls angegeben) bei und beendet die Synchronisierung mit dem Repo. Bleibt ohne Wirkung, wenn sich der Blueprint bereits in diesem Modus befindet.
git, database Antwort
Erfolgreiche Antwort
Öffentliches Ressourcenformat für Blueprint.
Hinweis: Das Enum type kann in Zukunft erweitert werden; Clients MÜSSEN unbekannte Werte
robust verarbeiten. Der YAML-Inhalt wird separat über
GET /blueprints/{id}/contents abgerufen.
enterprise, org, repo Ob bei jedem Push auf den Standardbranch des Repos ein Build der Umgebung erfolgt. Null, sofern dies kein Blueprint im Repository-Stammverzeichnis eines Repos ist.
Ob jeder Commit-Build als GitHub-Prüfdurchlauf für den Commit gemeldet wird. Null, sofern dies kein Blueprint im Repository-Stammverzeichnis eines Repos ist.
Wo die YAML-Datei erstellt und bearbeitet wird: 'git' (aus .devin/blueprint.yaml im Repo synchronisiert) oder 'database' (über die API/Benutzeroberfläche bearbeitet). Für Blueprints auf Enterprise- und Org-Ebene immer null.
git, database 
