組織のセキュリティプロファイル設定を更新
curl --request PATCH \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automations_default": {
"profile_id": "<string>"
},
"default": {
"profile_id": "<string>"
}
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings"
payload = {
"automations_default": { "profile_id": "<string>" },
"default": { "profile_id": "<string>" }
}
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({
automations_default: {profile_id: '<string>'},
default: {profile_id: '<string>'}
})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-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://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings",
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([
'automations_default' => [
'profile_id' => '<string>'
],
'default' => [
'profile_id' => '<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://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings"
payload := strings.NewReader("{\n \"automations_default\": {\n \"profile_id\": \"<string>\"\n },\n \"default\": {\n \"profile_id\": \"<string>\"\n }\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/v3beta1/organizations/{org_id}/security-profile-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automations_default\": {\n \"profile_id\": \"<string>\"\n },\n \"default\": {\n \"profile_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings")
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 \"automations_default\": {\n \"profile_id\": \"<string>\"\n },\n \"default\": {\n \"profile_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"automations_default": {
"selection": "inherit",
"profile_id": "<string>",
"profile_scope": "org"
},
"default": {
"selection": "inherit",
"profile_id": "<string>",
"profile_scope": "org"
}
}{
"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"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}セキュリティプロファイル(組織)[ベータ版]
組織のセキュリティプロファイル設定を更新
組織のデフォルトのセキュリティプロファイルの選択設定を更新します。 省略されたフィールドは変更されません。固定するプロファイルには、org-ownedのプロファイル、または その組織が属するエンタープライズの共有プロファイルを指定できます。
PATCH
/
v3beta1
/
organizations
/
{org_id}
/
security-profile-settings
組織のセキュリティプロファイル設定を更新
curl --request PATCH \
--url https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"automations_default": {
"profile_id": "<string>"
},
"default": {
"profile_id": "<string>"
}
}
'import requests
url = "https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings"
payload = {
"automations_default": { "profile_id": "<string>" },
"default": { "profile_id": "<string>" }
}
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({
automations_default: {profile_id: '<string>'},
default: {profile_id: '<string>'}
})
};
fetch('https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-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://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings",
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([
'automations_default' => [
'profile_id' => '<string>'
],
'default' => [
'profile_id' => '<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://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings"
payload := strings.NewReader("{\n \"automations_default\": {\n \"profile_id\": \"<string>\"\n },\n \"default\": {\n \"profile_id\": \"<string>\"\n }\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/v3beta1/organizations/{org_id}/security-profile-settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"automations_default\": {\n \"profile_id\": \"<string>\"\n },\n \"default\": {\n \"profile_id\": \"<string>\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3beta1/organizations/{org_id}/security-profile-settings")
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 \"automations_default\": {\n \"profile_id\": \"<string>\"\n },\n \"default\": {\n \"profile_id\": \"<string>\"\n }\n}"
response = http.request(request)
puts response.read_body{
"automations_default": {
"selection": "inherit",
"profile_id": "<string>",
"profile_scope": "org"
},
"default": {
"selection": "inherit",
"profile_id": "<string>",
"profile_scope": "org"
}
}{
"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"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}組織のデフォルトのセキュリティプロファイルの選択項目を更新し、更新後の設定を返します。
権限
組織レベルでManageSecureModeProfiles 権限を持つサービスユーザーまたは個人用アクセストークンが必要です。実行中の Devin セッションが利用するトークンは拒否されるため、セッションが自身に適用されるプロファイルを変更することはできません。
動作
- 省略したフィールドは変更されません。
nullは拒否されます。デフォルトをクリアするには、inheritを設定してください (例:{"default": {"selection": "inherit"}}または{"automations_default": {"selection": "inherit"}}) 。 profile_idは、selectionがprofileの場合は必須で、それ以外の場合は省略する必要があります。固定するプロファイルには、org-owned のプロファイル、またはエンタープライズの共有プロファイルのいずれかを指定できます。- 実行中のセッションには、次回の起動時または復帰時に変更が反映されます。
ボディ
application/json
PATCH の動作:省略されたフィールドは変更されません。

