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"
}
'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"
}
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'
})
};
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'
]),
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}")
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}")
.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}"
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",
"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",
"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"
}
'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"
}
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'
})
};
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'
]),
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}")
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}")
.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}"
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",
"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",
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Organization identifier
Runner lease identifier
Body
application/json
Required string length:
1 - 512Required range:
x >= 1Required range:
x >= 1Available options:
renew, progress, turn_intent_persisted, started, model_completed, completed, failed, aborted, orphaned, uncertain_outcome, acknowledge Available options:
preparing, turn_intent_persisted, sdk_accepted, running, model_completed, finalizing, null Available options:
runner_error, sdk_error, model_error, timeout, cancelled, unknown, null Response
Lease transition applied or idempotently replayed
Fenced local execution lease. The lease token is never returned in this object.
Show child attributes
Show child attributes

