Zeitplan aktualisieren
curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"enabled": true,
"bypass_approval": true,
"run_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<string>"
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_id}"
payload = {
"name": "<string>",
"prompt": "<string>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"enabled": True,
"bypass_approval": True,
"run_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": ["<string>"],
"target_devin_id": "<string>",
"platform": "<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({
name: '<string>',
prompt: '<string>',
playbook_id: '<string>',
skill_ref: {plugin_identity: '<string>', skill_name: '<string>'},
frequency: '<string>',
interval_count: 123,
scheduled_at: '2023-11-07T05:31:56Z',
enabled: true,
bypass_approval: true,
run_as_user_id: '<string>',
slack_channel_id: '<string>',
slack_team_id: '<string>',
tags: ['<string>'],
target_devin_id: '<string>',
platform: '<string>'
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_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}/schedules/{schedule_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([
'name' => '<string>',
'prompt' => '<string>',
'playbook_id' => '<string>',
'skill_ref' => [
'plugin_identity' => '<string>',
'skill_name' => '<string>'
],
'frequency' => '<string>',
'interval_count' => 123,
'scheduled_at' => '2023-11-07T05:31:56Z',
'enabled' => true,
'bypass_approval' => true,
'run_as_user_id' => '<string>',
'slack_channel_id' => '<string>',
'slack_team_id' => '<string>',
'tags' => [
'<string>'
],
'target_devin_id' => '<string>',
'platform' => '<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/v3/organizations/{org_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"bypass_approval\": true,\n \"run_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\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}/schedules/{schedule_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"bypass_approval\": true,\n \"run_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_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 \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"bypass_approval\": true,\n \"run_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"scheduled_session_id": "<string>",
"org_id": "<string>",
"created_by": "<string>",
"name": "<string>",
"prompt": "<string>",
"playbook": {
"playbook_id": "<string>",
"title": "<string>"
},
"frequency": "<string>",
"enabled": true,
"last_executed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error_message": "<string>",
"consecutive_failures": 123,
"notify_on": "always",
"agent": "devin",
"last_edited_by": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"bypass_approval": false,
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<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>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}Zeitpläne (Organisation)
Zeitplan aktualisieren
deprecated
Einen vorhandenen Zeitplan aktualisieren.
Veraltet. Zeitpläne wurden durch Automatisierungen abgelöst: Erstellen Sie stattdessen über POST /v3/organizations/{org_id}/automations eine Automatisierung mit einem schedule:recurring-Auslöser. Dieser Endpunkt bleibt für bestehende Zeitpläne verfügbar.
PATCH
/
v3
/
organizations
/
{org_id}
/
schedules
/
{schedule_id}
Zeitplan aktualisieren
curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"prompt": "<string>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"enabled": true,
"bypass_approval": true,
"run_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<string>"
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_id}"
payload = {
"name": "<string>",
"prompt": "<string>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 123,
"scheduled_at": "2023-11-07T05:31:56Z",
"enabled": True,
"bypass_approval": True,
"run_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": ["<string>"],
"target_devin_id": "<string>",
"platform": "<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({
name: '<string>',
prompt: '<string>',
playbook_id: '<string>',
skill_ref: {plugin_identity: '<string>', skill_name: '<string>'},
frequency: '<string>',
interval_count: 123,
scheduled_at: '2023-11-07T05:31:56Z',
enabled: true,
bypass_approval: true,
run_as_user_id: '<string>',
slack_channel_id: '<string>',
slack_team_id: '<string>',
tags: ['<string>'],
target_devin_id: '<string>',
platform: '<string>'
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_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}/schedules/{schedule_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([
'name' => '<string>',
'prompt' => '<string>',
'playbook_id' => '<string>',
'skill_ref' => [
'plugin_identity' => '<string>',
'skill_name' => '<string>'
],
'frequency' => '<string>',
'interval_count' => 123,
'scheduled_at' => '2023-11-07T05:31:56Z',
'enabled' => true,
'bypass_approval' => true,
'run_as_user_id' => '<string>',
'slack_channel_id' => '<string>',
'slack_team_id' => '<string>',
'tags' => [
'<string>'
],
'target_devin_id' => '<string>',
'platform' => '<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/v3/organizations/{org_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"bypass_approval\": true,\n \"run_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\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}/schedules/{schedule_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"bypass_approval\": true,\n \"run_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_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 \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"enabled\": true,\n \"bypass_approval\": true,\n \"run_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"scheduled_session_id": "<string>",
"org_id": "<string>",
"created_by": "<string>",
"name": "<string>",
"prompt": "<string>",
"playbook": {
"playbook_id": "<string>",
"title": "<string>"
},
"frequency": "<string>",
"enabled": true,
"last_executed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error_message": "<string>",
"consecutive_failures": 123,
"notify_on": "always",
"agent": "devin",
"last_edited_by": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"bypass_approval": false,
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<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>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}Veraltet. Zeitpläne werden durch Automations ersetzt. Dieser Endpunkt funktioniert für bestehende Zeitpläne weiterhin; neue geplante Aufgaben sollten als Automatisierung mit einem
schedule:recurring-Trigger erstellt werden.ManageOrgSchedules auf Organisationsebene.
Hinweise
Alle Felder sind optional. Nur die im Request-Body angegebenen Felder werden aktualisiert. Um einen Zeitplan zu deaktivieren, setzen Sieenabled auf false.
Wenn Sie playbook_id auf null setzen, wird das zugehörige Playbook gelöscht.
Sie können den schedule_type zwischen recurring und one_time ändern. Wenn Sie zu one_time wechseln, geben Sie scheduled_at mit einem zukünftigen Datum-Uhrzeit-Wert im ISO-8601-Format an. Wenn Sie zu recurring wechseln, geben Sie frequency mit einem gültigen Cron-Ausdruck an.
Ausführungsidentität
Der Parameterrun_as_user_id steuert, unter welcher Benutzeridentität der Zeitplan ausgeführt wird. Wenn ein Zeitplan ausgelöst wird, werden Sitzungen für diesen Benutzer erstellt – er erhält Benachrichtigungen und die Sitzung erscheint in seinem Verlauf.
- Benutzer festlegen: Geben Sie eine gültige Benutzer-ID an, um die Ausführungsidentität zu ändern. Dies erfordert:
- Der Servicebenutzer muss die Berechtigung
ImpersonateOrgSessionshaben - Der Zielbenutzer muss Mitglied der Organisation sein
- Der Zielbenutzer muss die Berechtigung
UseDevinSessionshaben
- Der Servicebenutzer muss die Berechtigung
- Löschen (auf
nullsetzen): Setzt den Zeitplan zurück, sodass er mit dem Standard-Bot-Benutzer ausgeführt wird - Feld weglassen: Belässt die aktuelle Ausführungsidentität unverändert
Autorisierungen
Pfadparameter
Body
application/json
VM-Plattform für Sitzungen, die durch diesen Zeitplan gestartet werden (z. B. „windows“). Wenn sie weggelassen wird, bleibt die Plattform unverändert. Der Wert muss mit einer für die Organisation konfigurierten Plattform übereinstimmen (Groß-/Kleinschreibung wird nicht beachtet); unbekannte Werte werden mit einem 400-Fehler abgelehnt, der die verfügbaren Plattformbezeichnungen auflistet.
Antwort
Erfolgreiche Antwort

