import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const schedule = await client.schedules.update('agent_abc123', 'schedule_abc123');
console.log(schedule.id);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
schedule = client.schedules.update(
agent_id="agent_abc123",
schedule_id="schedule_abc123",
)
print(schedule.id)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
schedule, err := client.Schedules.Update(
context.TODO(),
"agent_abc123",
"schedule_abc123",
cercago.ScheduleUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", schedule.ID)
}
require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
schedule = cerca.schedules.update("agent_abc123", "schedule_abc123")
puts(schedule)cerca schedules update \
--api-key 'My API Key' \
--agent-id agent_abc123 \
--schedule-id schedule_abc123curl --request PUT \
--url https://api.cerca.dev/agents/{agentId}/schedules/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cron": "<string>",
"enabled": true,
"instructions": "<string>",
"message": "<string>",
"model": "<string>",
"name": "<string>",
"runAt": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"tools": [
"sandbox.*"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/schedules/{scheduleId}",
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([
'cron' => '<string>',
'enabled' => true,
'instructions' => '<string>',
'message' => '<string>',
'model' => '<string>',
'name' => '<string>',
'runAt' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'tools' => [
'sandbox.*'
]
]),
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;
}HttpResponse<String> response = Unirest.put("https://api.cerca.dev/agents/{agentId}/schedules/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"instructions\": \"<string>\",\n \"message\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"runAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"tools\": [\n \"sandbox.*\"\n ]\n}")
.asString();{
"createdAt": "<string>",
"enabled": true,
"id": "<string>",
"name": "<string>",
"nextAt": "<string>",
"message": "<string>",
"timezone": "<string>",
"updatedAt": "<string>",
"cron": "<string>",
"instructions": "<string>",
"model": "<string>",
"runAt": "2023-11-07T05:31:56Z",
"tools": [
"sandbox.*"
]
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Update schedule
import Cerca from '@cerca-dev/sdk';
const client = new Cerca({
apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});
const schedule = await client.schedules.update('agent_abc123', 'schedule_abc123');
console.log(schedule.id);import os
from cerca import Cerca
client = Cerca(
api_key=os.environ.get("CERCA_API_KEY"), # This is the default and can be omitted
)
schedule = client.schedules.update(
agent_id="agent_abc123",
schedule_id="schedule_abc123",
)
print(schedule.id)package main
import (
"context"
"fmt"
"github.com/matrices/cerca-go"
"github.com/matrices/cerca-go/option"
)
func main() {
client := cercago.NewClient(
option.WithAPIKey("My API Key"),
)
schedule, err := client.Schedules.Update(
context.TODO(),
"agent_abc123",
"schedule_abc123",
cercago.ScheduleUpdateParams{},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", schedule.ID)
}
require "cerca"
cerca = Cerca::Client.new(api_key: "My API Key")
schedule = cerca.schedules.update("agent_abc123", "schedule_abc123")
puts(schedule)cerca schedules update \
--api-key 'My API Key' \
--agent-id agent_abc123 \
--schedule-id schedule_abc123curl --request PUT \
--url https://api.cerca.dev/agents/{agentId}/schedules/{scheduleId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"cron": "<string>",
"enabled": true,
"instructions": "<string>",
"message": "<string>",
"model": "<string>",
"name": "<string>",
"runAt": "2023-11-07T05:31:56Z",
"timezone": "<string>",
"tools": [
"sandbox.*"
]
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cerca.dev/agents/{agentId}/schedules/{scheduleId}",
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([
'cron' => '<string>',
'enabled' => true,
'instructions' => '<string>',
'message' => '<string>',
'model' => '<string>',
'name' => '<string>',
'runAt' => '2023-11-07T05:31:56Z',
'timezone' => '<string>',
'tools' => [
'sandbox.*'
]
]),
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;
}HttpResponse<String> response = Unirest.put("https://api.cerca.dev/agents/{agentId}/schedules/{scheduleId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"instructions\": \"<string>\",\n \"message\": \"<string>\",\n \"model\": \"<string>\",\n \"name\": \"<string>\",\n \"runAt\": \"2023-11-07T05:31:56Z\",\n \"timezone\": \"<string>\",\n \"tools\": [\n \"sandbox.*\"\n ]\n}")
.asString();{
"createdAt": "<string>",
"enabled": true,
"id": "<string>",
"name": "<string>",
"nextAt": "<string>",
"message": "<string>",
"timezone": "<string>",
"updatedAt": "<string>",
"cron": "<string>",
"instructions": "<string>",
"model": "<string>",
"runAt": "2023-11-07T05:31:56Z",
"tools": [
"sandbox.*"
]
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}{
"error": "<string>",
"code": "MONTHLY_TOKEN_BUDGET_EXCEEDED"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
1"agent_abc123"
1"schedule_abc123"
Body
Per-schedule tool subset. When updated, these tools can only narrow the agent's effective tools for future scheduled threads.
Configurable runtime tool name, configurable namespace wildcard such as sandbox., or external namespace wildcard such as google.. At thread and turn scope, entries can only narrow the agent's effective tools.
1Response
Schedule updated.
Per-schedule tool subset. Scheduled threads inherit the agent's effective tools when omitted and can only narrow them when provided.
Configurable runtime tool name, configurable namespace wildcard such as sandbox., or external namespace wildcard such as google.. At thread and turn scope, entries can only narrow the agent's effective tools.
1