curl --request PATCH \
--url https://api.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fencing_token": 1,
"cron": "<string>",
"message": "<string>",
"paused": true,
"timezone": "<string>"
}
'import requests
url = "https://api.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id}"
payload = {
"fencing_token": 1,
"cron": "<string>",
"message": "<string>",
"paused": True,
"timezone": "<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({
fencing_token: 1,
cron: '<string>',
message: '<string>',
paused: true,
timezone: '<string>'
})
};
fetch('https://api.agentsfleet.net/v1/runners/me/leases/{lease_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.agentsfleet.net/v1/runners/me/leases/{lease_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([
'fencing_token' => 1,
'cron' => '<string>',
'message' => '<string>',
'paused' => true,
'timezone' => '<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.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"fencing_token\": 1,\n \"cron\": \"<string>\",\n \"message\": \"<string>\",\n \"paused\": true,\n \"timezone\": \"<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.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fencing_token\": 1,\n \"cron\": \"<string>\",\n \"message\": \"<string>\",\n \"paused\": true,\n \"timezone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/runners/me/leases/{lease_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 \"fencing_token\": 1,\n \"cron\": \"<string>\",\n \"message\": \"<string>\",\n \"paused\": true,\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"cron": "<string>",
"etag": "<string>",
"fleet_id": "<string>",
"message": "<string>",
"once": true,
"schedule_id": "<string>",
"source": "<string>",
"status": "<string>",
"sync": "<string>",
"timezone": "<string>",
"updated_at": 123,
"last_error": "<string>",
"override": {
"cron": null,
"message": null,
"status": "active",
"timezone": null
}
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}Change a schedule the fleet made
Changes the fields a body names on a schedule the running fleet created, and pushes the result to QStash. A new message has the fleet’s declared secrets masked out. A schedule a person made answers UZ-SCHED-010. Sending the same body twice leaves the same schedule.
curl --request PATCH \
--url https://api.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"fencing_token": 1,
"cron": "<string>",
"message": "<string>",
"paused": true,
"timezone": "<string>"
}
'import requests
url = "https://api.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id}"
payload = {
"fencing_token": 1,
"cron": "<string>",
"message": "<string>",
"paused": True,
"timezone": "<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({
fencing_token: 1,
cron: '<string>',
message: '<string>',
paused: true,
timezone: '<string>'
})
};
fetch('https://api.agentsfleet.net/v1/runners/me/leases/{lease_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.agentsfleet.net/v1/runners/me/leases/{lease_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([
'fencing_token' => 1,
'cron' => '<string>',
'message' => '<string>',
'paused' => true,
'timezone' => '<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.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id}"
payload := strings.NewReader("{\n \"fencing_token\": 1,\n \"cron\": \"<string>\",\n \"message\": \"<string>\",\n \"paused\": true,\n \"timezone\": \"<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.agentsfleet.net/v1/runners/me/leases/{lease_id}/schedules/{schedule_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"fencing_token\": 1,\n \"cron\": \"<string>\",\n \"message\": \"<string>\",\n \"paused\": true,\n \"timezone\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.agentsfleet.net/v1/runners/me/leases/{lease_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 \"fencing_token\": 1,\n \"cron\": \"<string>\",\n \"message\": \"<string>\",\n \"paused\": true,\n \"timezone\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": 123,
"cron": "<string>",
"etag": "<string>",
"fleet_id": "<string>",
"message": "<string>",
"once": true,
"schedule_id": "<string>",
"source": "<string>",
"status": "<string>",
"sync": "<string>",
"timezone": "<string>",
"updated_at": 123,
"last_error": "<string>",
"override": {
"cron": null,
"message": null,
"status": "active",
"timezone": null
}
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}{
"detail": "<string>",
"docs_uri": "<string>",
"error_code": "<string>",
"request_id": "<string>",
"title": "<string>",
"action_id": "<string>",
"current_state": "<string>",
"etag": "<string>",
"gate_id": "<string>",
"outcome": "<string>",
"resolved_at": 123,
"resolved_by": "<string>",
"user_message": "<string>"
}Authorizations
The opaque agt_r token minted when the runner enrols (POST /v1/runners)
Path Parameters
UUIDv7 of the lease.
UUIDv7 of the schedule.
Body
PATCH /v1/runners/me/leases/{lease_id}/schedules/{schedule_id} request.
Every field but the fence is optional, and an absent one is left alone.
Response
The schedule as reconciled with the scheduler
One schedule, as the tenant surface renders it.
When it was created.
The expression it fires on.
Strong tag binding the pinned recipe, setup and instance override.
The fleet it wakes.
What the fleet is asked to do.
Whether it retires after its first fire. Beta: this field may change shape before it is stable.
Its identity.
Who made it: api for a person, trigger for the fleet's own
document, fleet for the fleet while it ran. Only a fleet schedule
can be changed by the fleet. Beta: this field may change shape before it is stable.
What the operator wants it to be doing.
How far agentsfleet has brought the external scheduler in line.
A schedule can save without registering. This field shows you that state.
The zone that expression is read in.
When it was last changed.
Why the last push failed, when one did.
Explicit instance overlay, omitted when the pinned recipe is inherited.
Show child attributes
Show child attributes