プレイブックを更新します。
curl --request PUT \
--url https://api.devin.ai/v3/enterprise/playbooks/{playbook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"title": "<string>",
"macro": "<string>",
"structured_output_schema": {}
}
'import requests
url = "https://api.devin.ai/v3/enterprise/playbooks/{playbook_id}"
payload = {
"body": "<string>",
"title": "<string>",
"macro": "<string>",
"structured_output_schema": {}
}
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({
body: JSON.stringify('<string>'),
title: '<string>',
macro: '<string>',
structured_output_schema: {}
})
};
fetch('https://api.devin.ai/v3/enterprise/playbooks/{playbook_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/enterprise/playbooks/{playbook_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([
'body' => '<string>',
'title' => '<string>',
'macro' => '<string>',
'structured_output_schema' => [
]
]),
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/enterprise/playbooks/{playbook_id}"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"macro\": \"<string>\",\n \"structured_output_schema\": {}\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://api.devin.ai/v3/enterprise/playbooks/{playbook_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"macro\": \"<string>\",\n \"structured_output_schema\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/playbooks/{playbook_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 \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"macro\": \"<string>\",\n \"structured_output_schema\": {}\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"created_at": 123,
"created_by": "<string>",
"macro": "<string>",
"org_id": "<string>",
"playbook_id": "<string>",
"title": "<string>",
"updated_at": 123,
"updated_by": "<string>",
"structured_output_schema": {}
}{
"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"
}プレイブック(Enterprise)
プレイブックを更新します。
PUT
/
v3
/
enterprise
/
playbooks
/
{playbook_id}
プレイブックを更新します。
curl --request PUT \
--url https://api.devin.ai/v3/enterprise/playbooks/{playbook_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"body": "<string>",
"title": "<string>",
"macro": "<string>",
"structured_output_schema": {}
}
'import requests
url = "https://api.devin.ai/v3/enterprise/playbooks/{playbook_id}"
payload = {
"body": "<string>",
"title": "<string>",
"macro": "<string>",
"structured_output_schema": {}
}
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({
body: JSON.stringify('<string>'),
title: '<string>',
macro: '<string>',
structured_output_schema: {}
})
};
fetch('https://api.devin.ai/v3/enterprise/playbooks/{playbook_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/enterprise/playbooks/{playbook_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([
'body' => '<string>',
'title' => '<string>',
'macro' => '<string>',
'structured_output_schema' => [
]
]),
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/enterprise/playbooks/{playbook_id}"
payload := strings.NewReader("{\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"macro\": \"<string>\",\n \"structured_output_schema\": {}\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://api.devin.ai/v3/enterprise/playbooks/{playbook_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"macro\": \"<string>\",\n \"structured_output_schema\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/enterprise/playbooks/{playbook_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 \"body\": \"<string>\",\n \"title\": \"<string>\",\n \"macro\": \"<string>\",\n \"structured_output_schema\": {}\n}"
response = http.request(request)
puts response.read_body{
"body": "<string>",
"created_at": 123,
"created_by": "<string>",
"macro": "<string>",
"org_id": "<string>",
"playbook_id": "<string>",
"title": "<string>",
"updated_at": 123,
"updated_by": "<string>",
"structured_output_schema": {}
}{
"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"
}権限
ManageAccountPlaybooks 権限が付与されたサービスユーザーが必要です。承認
サービスユーザーの認証情報(接頭辞: cog_)
パスパラメータ
Playbook ID(接頭辞: playbook-)
例:
"playbook-abc123def456"
ボディ
application/json
Playbook マクロ識別子。'!' で始まり、その後に 1 文字以上の英字、数字、アンダースコア、またはハイフンが続く必要があります。例: '!my_macro' または '!my-macro'
このプレイブックを使用するセッションが構造化出力として生成する JSON Schema(Draft 7)。最大 64KB。自己完結型である必要があります(外部 $ref は使用不可)。
レスポンス
成功時のレスポンス
⌘I

