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 '
{
"bypass_approval": true,
"enabled": true,
"frequency": "<string>",
"interval_count": 123,
"name": "<string>",
"platform": "<string>",
"playbook_id": "<string>",
"prompt": "<string>",
"run_as_user_id": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>"
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_id}"
payload = {
"bypass_approval": True,
"enabled": True,
"frequency": "<string>",
"interval_count": 123,
"name": "<string>",
"platform": "<string>",
"playbook_id": "<string>",
"prompt": "<string>",
"run_as_user_id": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": ["<string>"],
"target_devin_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({
bypass_approval: true,
enabled: true,
frequency: '<string>',
interval_count: 123,
name: '<string>',
platform: '<string>',
playbook_id: '<string>',
prompt: '<string>',
run_as_user_id: '<string>',
scheduled_at: '2023-11-07T05:31:56Z',
slack_channel_id: '<string>',
slack_team_id: '<string>',
tags: ['<string>'],
target_devin_id: '<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([
'bypass_approval' => true,
'enabled' => true,
'frequency' => '<string>',
'interval_count' => 123,
'name' => '<string>',
'platform' => '<string>',
'playbook_id' => '<string>',
'prompt' => '<string>',
'run_as_user_id' => '<string>',
'scheduled_at' => '2023-11-07T05:31:56Z',
'slack_channel_id' => '<string>',
'slack_team_id' => '<string>',
'tags' => [
'<string>'
],
'target_devin_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/v3/organizations/{org_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"bypass_approval\": true,\n \"enabled\": true,\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"name\": \"<string>\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"run_as_user_id\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<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 \"bypass_approval\": true,\n \"enabled\": true,\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"name\": \"<string>\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"run_as_user_id\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<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 \"bypass_approval\": true,\n \"enabled\": true,\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"name\": \"<string>\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"run_as_user_id\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent": "devin",
"consecutive_failures": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"enabled": true,
"frequency": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error_message": "<string>",
"last_executed_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"notify_on": "always",
"org_id": "<string>",
"playbook": {
"playbook_id": "<string>",
"title": "<string>"
},
"prompt": "<string>",
"scheduled_session_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"bypass_approval": false,
"interval_count": 1,
"last_edited_by": "<string>",
"platform": "<string>",
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>"
}{
"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"
}Atualizar agendamento
Atualiza um agendamento existente.
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 '
{
"bypass_approval": true,
"enabled": true,
"frequency": "<string>",
"interval_count": 123,
"name": "<string>",
"platform": "<string>",
"playbook_id": "<string>",
"prompt": "<string>",
"run_as_user_id": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>"
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/schedules/{schedule_id}"
payload = {
"bypass_approval": True,
"enabled": True,
"frequency": "<string>",
"interval_count": 123,
"name": "<string>",
"platform": "<string>",
"playbook_id": "<string>",
"prompt": "<string>",
"run_as_user_id": "<string>",
"scheduled_at": "2023-11-07T05:31:56Z",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": ["<string>"],
"target_devin_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({
bypass_approval: true,
enabled: true,
frequency: '<string>',
interval_count: 123,
name: '<string>',
platform: '<string>',
playbook_id: '<string>',
prompt: '<string>',
run_as_user_id: '<string>',
scheduled_at: '2023-11-07T05:31:56Z',
slack_channel_id: '<string>',
slack_team_id: '<string>',
tags: ['<string>'],
target_devin_id: '<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([
'bypass_approval' => true,
'enabled' => true,
'frequency' => '<string>',
'interval_count' => 123,
'name' => '<string>',
'platform' => '<string>',
'playbook_id' => '<string>',
'prompt' => '<string>',
'run_as_user_id' => '<string>',
'scheduled_at' => '2023-11-07T05:31:56Z',
'slack_channel_id' => '<string>',
'slack_team_id' => '<string>',
'tags' => [
'<string>'
],
'target_devin_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/v3/organizations/{org_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"bypass_approval\": true,\n \"enabled\": true,\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"name\": \"<string>\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"run_as_user_id\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<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 \"bypass_approval\": true,\n \"enabled\": true,\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"name\": \"<string>\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"run_as_user_id\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<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 \"bypass_approval\": true,\n \"enabled\": true,\n \"frequency\": \"<string>\",\n \"interval_count\": 123,\n \"name\": \"<string>\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"prompt\": \"<string>\",\n \"run_as_user_id\": \"<string>\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"agent": "devin",
"consecutive_failures": 123,
"created_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"enabled": true,
"frequency": "<string>",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error_message": "<string>",
"last_executed_at": "2023-11-07T05:31:56Z",
"name": "<string>",
"notify_on": "always",
"org_id": "<string>",
"playbook": {
"playbook_id": "<string>",
"title": "<string>"
},
"prompt": "<string>",
"scheduled_session_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"bypass_approval": false,
"interval_count": 1,
"last_edited_by": "<string>",
"platform": "<string>",
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>"
}{
"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"
}schedule:recurring.Permissões
ManageOrgSchedules no nível da organização.
Notas
enabled como false.
Definir playbook_id como null removerá a associação com o playbook.
Você pode alterar o schedule_type entre recurring e one_time. Ao mudar para one_time, forneça scheduled_at com uma data e hora futuras no formato ISO 8601. Ao mudar para recurring, forneça frequency com uma expressão cron válida.
Identidade de execução
run_as_user_id controla com qual identidade de usuário o agendamento é executado. Quando um agendamento é acionado, as sessões são criadas com esse usuário — ele recebe notificações e a sessão aparece em seu histórico.
- Definir um usuário: Forneça um ID de usuário válido para alterar a identidade de execução. Isso requer:
- O usuário de serviço deve ter a permissão
ImpersonateOrgSessions - O usuário de destino deve ser membro da organização
- O usuário de destino deve ter a permissão
UseDevinSessions
- O usuário de serviço deve ter a permissão
- Limpar (definir como
null): Faz o agendamento voltar a ser executado como o usuário bot padrão - Omitir o campo: Mantém a identidade de execução atual inalterada
Autorizações
Credencial de usuário de serviço (prefixo: cog_)
Parâmetros de caminho
ID do agendamento (prefixo: sched-)
"sched-abc123def456"
ID da organização (prefixo: org-)
"org-abc123def456"
Corpo
devin, data_analyst always, failure, never Plataforma de VM para sessões iniciadas por esta programação (por exemplo, 'windows'). Quando omitido, a plataforma permanece inalterada. O valor deve corresponder a uma plataforma configurada para a organização (sem diferenciar maiúsculas de minúsculas); valores desconhecidos são rejeitados com um 400 que lista os rótulos de plataforma disponíveis.
Define o ID de usuário com o qual esta programação será executada. Requer a permissão ImpersonateOrgSessions. Definir como null reverte para o usuário bot padrão. Omitir o campo mantém a identidade atual inalterada.
recurring, one_time Resposta
Resposta bem-sucedida
devin, data_analyst always, failure, never Show child attributes
Show child attributes
recurring, one_time 
