curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": true,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>"
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
},
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": []
}
]
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}"
payload = {
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": False,
"notifications": { "slack": { "channel_id": "<string>" } },
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": True,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"run_as": { "type": "organization" },
"security_profile": { "profile_id": "<string>" },
"session_settings": { "net_policy": { "allow": [{ "hostname": "<string>" }] } },
"tools": {
"linear_enabled": True,
"mcp_servers": [],
"slack_channels": []
},
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"replies": []
}
]
}
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({
actions: [
{
prompt: '<string>',
session: {
bypass_approval: false,
notifications: {slack: {channel_id: '<string>'}},
platform: '<string>',
playbook_id: '<string>',
repos: [],
tags: []
},
type: 'start_session'
}
],
concurrency: {max_concurrent_runs: 2, max_queue_depth: 1},
enabled: true,
limits: {invocations: {max_per_window: 2, window_seconds: 61}, max_acu_limit: 500},
metadata: {},
name: '<string>',
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
run_as: {type: 'organization'},
security_profile: {profile_id: '<string>'},
session_settings: {net_policy: {allow: [{hostname: '<string>'}]}},
tools: {linear_enabled: true, mcp_servers: [], slack_channels: []},
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
replies: []
}
]
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_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}/automations/{automation_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([
'actions' => [
[
'prompt' => '<string>',
'session' => [
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
]
],
'platform' => '<string>',
'playbook_id' => '<string>',
'repos' => [
],
'tags' => [
]
],
'type' => 'start_session'
]
],
'concurrency' => [
'max_concurrent_runs' => 2,
'max_queue_depth' => 1
],
'enabled' => true,
'limits' => [
'invocations' => [
'max_per_window' => 2,
'window_seconds' => 61
],
'max_acu_limit' => 500
],
'metadata' => [
],
'name' => '<string>',
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'run_as' => [
'type' => 'organization'
],
'security_profile' => [
'profile_id' => '<string>'
],
'session_settings' => [
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'tools' => [
'linear_enabled' => true,
'mcp_servers' => [
],
'slack_channels' => [
]
],
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'replies' => [
]
]
]
]),
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}/automations/{automation_id}"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\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/v3/organizations/{org_id}/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_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 \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"automation_id": "<string>",
"created_at": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
},
"enabled": true,
"name": "<string>",
"triggers": [
{
"event_type": "<string>",
"trigger_id": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": [],
"webhook": {
"url": "<string>",
"secret": "<string>"
}
}
],
"updated_at": 123,
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"last_edited_by": {
"id": "<string>",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>",
"warnings": []
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"template_id": "<string>",
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
}
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}自動化を更新
自動化を更新します。
指定されたグループは、デフォルトでメンバー単位でマージされます(RFC 7396)。省略されたメンバーは 保存済みの値を保持し、明示的な null は値をクリアします。リストのメンバーシップは 全体が置き換えられ、送信された各要素は、その型が両方にちょうど1つずつ存在する場合、 同じ型の保存済み要素にマージされます。
curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": true,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>"
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
},
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": []
}
]
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}"
payload = {
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": False,
"notifications": { "slack": { "channel_id": "<string>" } },
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": True,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"run_as": { "type": "organization" },
"security_profile": { "profile_id": "<string>" },
"session_settings": { "net_policy": { "allow": [{ "hostname": "<string>" }] } },
"tools": {
"linear_enabled": True,
"mcp_servers": [],
"slack_channels": []
},
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"replies": []
}
]
}
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({
actions: [
{
prompt: '<string>',
session: {
bypass_approval: false,
notifications: {slack: {channel_id: '<string>'}},
platform: '<string>',
playbook_id: '<string>',
repos: [],
tags: []
},
type: 'start_session'
}
],
concurrency: {max_concurrent_runs: 2, max_queue_depth: 1},
enabled: true,
limits: {invocations: {max_per_window: 2, window_seconds: 61}, max_acu_limit: 500},
metadata: {},
name: '<string>',
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
run_as: {type: 'organization'},
security_profile: {profile_id: '<string>'},
session_settings: {net_policy: {allow: [{hostname: '<string>'}]}},
tools: {linear_enabled: true, mcp_servers: [], slack_channels: []},
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
replies: []
}
]
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_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}/automations/{automation_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([
'actions' => [
[
'prompt' => '<string>',
'session' => [
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
]
],
'platform' => '<string>',
'playbook_id' => '<string>',
'repos' => [
],
'tags' => [
]
],
'type' => 'start_session'
]
],
'concurrency' => [
'max_concurrent_runs' => 2,
'max_queue_depth' => 1
],
'enabled' => true,
'limits' => [
'invocations' => [
'max_per_window' => 2,
'window_seconds' => 61
],
'max_acu_limit' => 500
],
'metadata' => [
],
'name' => '<string>',
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'run_as' => [
'type' => 'organization'
],
'security_profile' => [
'profile_id' => '<string>'
],
'session_settings' => [
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'tools' => [
'linear_enabled' => true,
'mcp_servers' => [
],
'slack_channels' => [
]
],
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'replies' => [
]
]
]
]),
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}/automations/{automation_id}"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\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/v3/organizations/{org_id}/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_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 \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"automation_id": "<string>",
"created_at": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
},
"enabled": true,
"name": "<string>",
"triggers": [
{
"event_type": "<string>",
"trigger_id": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": [],
"webhook": {
"url": "<string>",
"secret": "<string>"
}
}
],
"updated_at": 123,
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"last_edited_by": {
"id": "<string>",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>",
"warnings": []
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"template_id": "<string>",
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
}
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}権限
ManageOrgAutomations 権限を持つサービスユーザーが必要です。
マージのセマンティクス
merge_patch セマンティクスでは、PATCH フィールドはメンバーごとにマージされます (RFC 7396 形式) 。省略したメンバーは保存済みの値が維持され、明示的な null はクリアされ、空のグループは no-op です。メタデータはキーごとにマージされ、null 値はキーを削除します。リストは全体が置き換えられますが、各送信要素は、その型が送信側と保存済み側の両方でちょうど 1 回ずつ出現する場合、同じ型の保存済み要素にマージされます。
replace_groups セマンティクスでは、マージは行われません。送信されたオブジェクトグループは保存済みのグループ全体を置き換え、送信された triggers または actions リストは、要素ごとのマージを行わずに保存済みリスト全体を置き換えます。保持したいメンバーはすべて再送信してください。省略したメンバーはクリアされるか、デフォルト値にリセットされます。metadata も完全な置換セットとなるため、キーを削除するには、そのキーを含めないセットを再送信します。null のメタデータ値はキーを削除するのではなく、400 エラーで拒否されます。省略したトップレベルフィールドは引き続き変更されません。
いずれの動作に依存する前にも、イベントスキーマエンドポイントの update_semantics フィールドで、組織でアクティブなセマンティクスを確認してください。これをオープンな列挙型として扱い、上記の 2 つ以外の値も許容してください。
Webhook トリガー
webhook:incoming トリガーを再追加すると、新しいシークレットが生成され、更新レスポンスで返されます。シークレットが表示されるのはこのときだけなので、受け取ったら控えておいてください。既存の webhook トリガーを置き換える場合やそのまま保持する場合は、既存のシークレットが維持されます。承認
サービスユーザーの認証情報(接頭辞: cog_)
ボディ
PATCH フィールドはデフォルトでメンバー単位にマージされます。省略されたメンバーは保持され、
明示的な null はクリアされ、空のグループは何も行いません。メタデータはキーごとにマージされ、
null 値はキーを削除します。リストは完全に置換されます(削除するには、要素を除いたリストを再送信します)。
ただし、送信された各要素は、そのタイプが送信側と保存側の両方で正確に 1 回ずつ出現する場合、
同じタイプの保存済み要素にマージされます。作成時に必須の要素メンバー(prompt、
setup_prompt、monitor/triage Slack 設定、scan_id)は、対応する保存済み要素が存在する場合は
省略できます。他のメンバーと同様に引き継がれます。明示的な null は拒否されます。
- AutomationStartSessionActionUpdate
- AutomationMessageSessionActionUpdate
- AutomationMonitorSessionActionUpdate
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
1 - 500Show child attributes
Show child attributes
生成されたセッションの実行に使用する ID。organization: 組織の自動化 ID(アプリ内の System User)。セッションはシステム権限を使用するため、個人(ユーザースコープ)の接続でインストールされた MCP サーバーは選択できず、自動化を organization に切り替えると選択から削除されます。creator: 個人用自動化。作成者自身の権限で実行され、作成者と org 管理者のみが閲覧できます。サービスユーザーが作成した自動化では拒否されます。作成時に必須です。更新時に null を指定すると organization にリセットされます。
- AutomationRunAsOrganization
- AutomationRunAsCreator
Show child attributes
Show child attributes
自動化自体のセキュリティプロファイルのバインド。profile_id はそのプロファイルを固定し、{"profile_id": null} は明示的なオプトアウトを記録し、明示的な null は組織/Enterprise からの継承に戻します。セキュリティプロファイル管理権限が必要です。
Show child attributes
Show child attributes
この自動化が生成するすべてのセッション(監視セッションを含む)に適用されます。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
レスポンス
成功レスポンス
- AutomationStartSessionAction
- AutomationMessageSessionAction
- AutomationMonitorSessionAction
Show child attributes
Show child attributes
アクションまたはリソースに紐付けられたユーザーまたはサービスユーザーのプリンシパル。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
アクションまたはリソースに紐付けられたユーザーまたはサービスユーザーのプリンシパル。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
生成されるセッションの実行 ID。organization: org の自動化 ID(アプリ内の System User)— セッションはシステム権限を使用するため、個人用(ユーザースコープ)の接続でインストールされた MCPサーバーは選択できません。また、自動化を organization に切り替えると、それらは選択対象から除外されます。creator: 個人用自動化 — 作成者自身の権限で実行され、作成者と org 管理者にのみ表示されます。サービスユーザーが作成した自動化では使用できません。作成時に必須です。更新時に null を指定すると organization にリセットされます。
- AutomationRunAsOrganization
- AutomationRunAsCreator
Show child attributes
Show child attributes
自動化のセキュリティプロファイルのバインドと、解決された適用プロファイル。組織でセキュリティプロファイルが有効化されていない場合は null。
Show child attributes
Show child attributes
この自動化が生成するすべてのセッション(監視セッションを含む)に適用されます。
Show child attributes
Show child attributes
Show child attributes
Show child attributes

