Zum Hauptinhalt springen
PUT
/
v3
/
enterprise
/
playbooks
/
{playbook_id}
Playbook aktualisieren
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": {}
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

Berechtigungen

Erfordert einen Servicebenutzer mit der Berechtigung ManageAccountPlaybooks auf Enterprise-Ebene.

Autorisierungen

Authorization
string
header
erforderlich

Servicebenutzer-Anmeldedaten (Präfix: cog_)

Pfadparameter

playbook_id
string
erforderlich

Playbook-ID (Präfix: playbook-)

Beispiel:

"playbook-abc123def456"

Body

application/json
body
string
erforderlich
title
string
erforderlich
macro
string | null

Playbook-Makrokennung. Muss mit '!' beginnen, gefolgt von einem oder mehreren Buchstaben, Ziffern, Unterstrichen oder Bindestrichen. Beispiel: '!my_macro' oder '!my-macro'

structured_output_schema
Structured Output Schema · object | null

JSON-Schema (Draft 7), das von Sitzungen, die dieses Playbook verwenden, als strukturierte Ausgabe erzeugt wird. Max. 64 KB. Muss in sich geschlossen sein (keine externen $ref).

Antwort

Erfolgreiche Antwort

access_type
enum<string>
erforderlich
Verfügbare Optionen:
enterprise,
org
body
string
erforderlich
created_at
integer
erforderlich
created_by
string
erforderlich
macro
string | null
erforderlich
org_id
string | null
erforderlich
playbook_id
string
erforderlich
title
string
erforderlich
updated_at
integer
erforderlich
updated_by
string
erforderlich
structured_output_schema
Structured Output Schema · object | null