Renew a detached agent run lease
curl --request POST \
--url https://api.veryfront.com/runs/{run_id}/detached-lease \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lease_duration_seconds": 152,
"accept_dispatch": true
}
'import requests
url = "https://api.veryfront.com/runs/{run_id}/detached-lease"
payload = {
"lease_duration_seconds": 152,
"accept_dispatch": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({lease_duration_seconds: 152, accept_dispatch: true})
};
fetch('https://api.veryfront.com/runs/{run_id}/detached-lease', 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.veryfront.com/runs/{run_id}/detached-lease",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lease_duration_seconds' => 152,
'accept_dispatch' => true
]),
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.veryfront.com/runs/{run_id}/detached-lease"
payload := strings.NewReader("{\n \"lease_duration_seconds\": 152,\n \"accept_dispatch\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.veryfront.com/runs/{run_id}/detached-lease")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lease_duration_seconds\": 152,\n \"accept_dispatch\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/runs/{run_id}/detached-lease")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lease_duration_seconds\": 152,\n \"accept_dispatch\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "renewed",
"lease_expires_at": "2023-11-07T05:31:56Z"
}Extends the current detached generation lease using an explicitly scoped runtime credential. Superseded or expired generations cannot renew.
POST
/
runs
/
{run_id}
/
detached-lease
Renew a detached agent run lease
curl --request POST \
--url https://api.veryfront.com/runs/{run_id}/detached-lease \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"lease_duration_seconds": 152,
"accept_dispatch": true
}
'import requests
url = "https://api.veryfront.com/runs/{run_id}/detached-lease"
payload = {
"lease_duration_seconds": 152,
"accept_dispatch": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({lease_duration_seconds: 152, accept_dispatch: true})
};
fetch('https://api.veryfront.com/runs/{run_id}/detached-lease', 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.veryfront.com/runs/{run_id}/detached-lease",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'lease_duration_seconds' => 152,
'accept_dispatch' => true
]),
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.veryfront.com/runs/{run_id}/detached-lease"
payload := strings.NewReader("{\n \"lease_duration_seconds\": 152,\n \"accept_dispatch\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.veryfront.com/runs/{run_id}/detached-lease")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"lease_duration_seconds\": 152,\n \"accept_dispatch\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.veryfront.com/runs/{run_id}/detached-lease")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"lease_duration_seconds\": 152,\n \"accept_dispatch\": true\n}"
response = http.request(request)
puts response.read_body{
"status": "renewed",
"lease_expires_at": "2023-11-07T05:31:56Z"
}Authorizations
A run-bound Veryfront runtime event-writer token in the Authorization header.
Path Parameters
Minimum string length:
1Body
application/json