Apply a fenced local runner lease transition
curl --request PATCH \
--url https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"claimGeneration": 2,
"sequence": 2,
"mutationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threadId": "<string>"
}
'import requests
url = "https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}"
payload = {
"token": "<string>",
"claimGeneration": 2,
"sequence": 2,
"mutationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threadId": "<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({
token: '<string>',
claimGeneration: 2,
sequence: 2,
mutationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
threadId: '<string>'
})
};
fetch('https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}', 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://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}",
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([
'token' => '<string>',
'claimGeneration' => 2,
'sequence' => 2,
'mutationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'threadId' => '<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://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"claimGeneration\": 2,\n \"sequence\": 2,\n \"mutationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threadId\": \"<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://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"claimGeneration\": 2,\n \"sequence\": 2,\n \"mutationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threadId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}")
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 \"token\": \"<string>\",\n \"claimGeneration\": 2,\n \"sequence\": 2,\n \"mutationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threadId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"lease": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runner_installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_generation": 2,
"claim_kind": "issue",
"attention_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"human_attention_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runner_attention_idempotency_key": "<string>",
"idempotency_key": "<string>",
"state": "active",
"mutation_sequence": 1,
"last_mutation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_transition": "<string>",
"last_progress": "preparing",
"last_error_code": "runner_error",
"expires_at": "2023-11-07T05:31:56Z",
"turn_intent_persisted_at": "2023-11-07T05:31:56Z",
"sdk_accepted_at": "2023-11-07T05:31:56Z",
"model_completed_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"terminal_at": "2023-11-07T05:31:56Z",
"codex_thread_id": "<string>",
"verification_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_binding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}Members and agents
Apply a fenced local runner lease transition
Agent-only lease mutation. Organization, agent, current runner installation, generation, token, sequence, and mutation ID are verified. Exact mutation retries are idempotent. Optional progress and errorCode values use closed operational code sets; free-form runtime details are rejected.
PATCH
/
api
/
orgs
/
{id}
/
runner-leases
/
{leaseId}
Apply a fenced local runner lease transition
curl --request PATCH \
--url https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"token": "<string>",
"claimGeneration": 2,
"sequence": 2,
"mutationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threadId": "<string>"
}
'import requests
url = "https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}"
payload = {
"token": "<string>",
"claimGeneration": 2,
"sequence": 2,
"mutationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"threadId": "<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({
token: '<string>',
claimGeneration: 2,
sequence: 2,
mutationId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
threadId: '<string>'
})
};
fetch('https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}', 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://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}",
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([
'token' => '<string>',
'claimGeneration' => 2,
'sequence' => 2,
'mutationId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'threadId' => '<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://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}"
payload := strings.NewReader("{\n \"token\": \"<string>\",\n \"claimGeneration\": 2,\n \"sequence\": 2,\n \"mutationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threadId\": \"<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://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"token\": \"<string>\",\n \"claimGeneration\": 2,\n \"sequence\": 2,\n \"mutationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threadId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://atollhq.com/api/orgs/{id}/runner-leases/{leaseId}")
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 \"token\": \"<string>\",\n \"claimGeneration\": 2,\n \"sequence\": 2,\n \"mutationId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"threadId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"lease": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"issue_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runner_installation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_member_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"claim_generation": 2,
"claim_kind": "issue",
"attention_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"execution_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"human_attention_item_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"runner_attention_idempotency_key": "<string>",
"idempotency_key": "<string>",
"state": "active",
"mutation_sequence": 1,
"last_mutation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"last_transition": "<string>",
"last_progress": "preparing",
"last_error_code": "runner_error",
"expires_at": "2023-11-07T05:31:56Z",
"turn_intent_persisted_at": "2023-11-07T05:31:56Z",
"sdk_accepted_at": "2023-11-07T05:31:56Z",
"model_completed_at": "2023-11-07T05:31:56Z",
"started_at": "2023-11-07T05:31:56Z",
"terminal_at": "2023-11-07T05:31:56Z",
"codex_thread_id": "<string>",
"verification_event_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"artifact_binding_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}{
"error": "Unauthorized",
"code": "unauthorized"
}Authorizations
Path Parameters
Body
application/json

