ブループリントの内容、位置、ソース、コミット時のbuild設定のいずれかまたはすべてを更新する
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 '
{
"contents": "<string>",
"position": 123,
"build_on_default_branch_commit": true,
"report_check_runs": true
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}"
payload = {
"contents": "<string>",
"position": 123,
"build_on_default_branch_commit": True,
"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({
contents: '<string>',
position: 123,
build_on_default_branch_commit: true,
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([
'contents' => '<string>',
'position' => 123,
'build_on_default_branch_commit' => true,
'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 \"contents\": \"<string>\",\n \"position\": 123,\n \"build_on_default_branch_commit\": true,\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 \"contents\": \"<string>\",\n \"position\": 123,\n \"build_on_default_branch_commit\": true,\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 \"contents\": \"<string>\",\n \"position\": 123,\n \"build_on_default_branch_commit\": true,\n \"report_check_runs\": true\n}"
response = http.request(request)
puts response.read_body{
"blueprint_id": "<string>",
"type": "enterprise",
"repo_name": "<string>",
"created_at": 123,
"updated_at": 123,
"source": "git",
"build_on_default_branch_commit": true,
"report_check_runs": true
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}スナップショットのセットアップ(組織)
ブループリントの内容、位置、ソース、コミット時のbuild設定のいずれかまたはすべてを更新する
単一のブループリントを部分更新します。buildは自動的にトリガーされません。
指定可能なフィールド:
contents— ブループリントの新しいYAMLバージョンを書き込みます。position— リポジトリレベルのブループリントの実行順序を設定します。 組織レベルのブループリントには実行順序がないため、指定すると400を返します。source— リポジトリのモードをgitとdatabaseの間で切り替えます。 リポジトリレベルのルートブループリントのみが対象です。{"source": "database", "contents": ...}を指定するとGitとの連携を解除し、contentsを新しい唯一のバージョンとして保存します。build_on_default_branch_commit/report_check_runs— リポジトリごとの コミット時のbuildと、それに対応するGitHubチェックの実行を設定します。 github.comのリポジトリのルートブループリントのみが対象です。
リクエストボディが空の場合は400を返します。
PATCH
/
v3
/
organizations
/
{org_id}
/
snapshot-setup
/
blueprints
/
{blueprint_id}
ブループリントの内容、位置、ソース、コミット時のbuild設定のいずれかまたはすべてを更新する
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 '
{
"contents": "<string>",
"position": 123,
"build_on_default_branch_commit": true,
"report_check_runs": true
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/snapshot-setup/blueprints/{blueprint_id}"
payload = {
"contents": "<string>",
"position": 123,
"build_on_default_branch_commit": True,
"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({
contents: '<string>',
position: 123,
build_on_default_branch_commit: true,
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([
'contents' => '<string>',
'position' => 123,
'build_on_default_branch_commit' => true,
'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 \"contents\": \"<string>\",\n \"position\": 123,\n \"build_on_default_branch_commit\": true,\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 \"contents\": \"<string>\",\n \"position\": 123,\n \"build_on_default_branch_commit\": true,\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 \"contents\": \"<string>\",\n \"position\": 123,\n \"build_on_default_branch_commit\": true,\n \"report_check_runs\": true\n}"
response = http.request(request)
puts response.read_body{
"blueprint_id": "<string>",
"type": "enterprise",
"repo_name": "<string>",
"created_at": 123,
"updated_at": 123,
"source": "git",
"build_on_default_branch_commit": true,
"report_check_runs": true
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}権限
組織レベルでManageRepoBlueprints 権限を持つサービスユーザーまたはパーソナルアクセストークンが必要です。組織ティアのブループリントを作成または更新するには、ManageOrgSnapshots 権限が必要です。
動作
ブループリントの内容や位置を更新します。ビルドは自動ではトリガーされません。ボディ
application/json
組織ティアまたは repo ティアのブループリントに対する部分更新。
フィールドは任意の一部のみを与えることができます。設定されていないフィールドはそのまま維持されます。
組織ティアのブループリントに position、source、またはコミット時の build 設定を与えると
400 が返されます — これらを持つのは repo ティアのブループリントのみです。
build はトリガーされません。
設定すると、リポジトリのブループリントのソースが切り替わります。リポジトリのルートブループリントでのみ指定できます(スコープ付きブループリントはこの設定を継承します)。'git' はデフォルトブランチから .devin/blueprint.yaml を取得し(存在しない場合は 404)、'contents' とは併用できません。'database' は現在の YAML('contents' が指定されている場合はその内容)を保持し、リポジトリからの同期を停止します。ブループリントがすでにそのモードになっている場合は no-op です。
利用可能なオプション:
git, database レスポンス
成功レスポンス
公開 Blueprint リソースのスキーマ。
注: type 列挙型には今後新しい値が追加される可能性があります。クライアントは未知の値も適切に処理する必要があります。YAML の内容は GET /blueprints/{id}/contents から別途取得します。

