Change breaker and caps
curl --request PATCH \
--url https://api.zode.dev/v1/proxying/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reset": true,
"loop": {
"max_calls": 5005,
"max_spend_micros": 500250000,
"max_same_failures": 51
},
"caps": {
"sandbox_max_cost_micros": 5000050000,
"daily_cap_micros": 50000500000,
"low_balance_micros": 5000000000
}
}
'import requests
url = "https://api.zode.dev/v1/proxying/settings"
payload = {
"reset": True,
"loop": {
"max_calls": 5005,
"max_spend_micros": 500250000,
"max_same_failures": 51
},
"caps": {
"sandbox_max_cost_micros": 5000050000,
"daily_cap_micros": 50000500000,
"low_balance_micros": 5000000000
}
}
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({
reset: true,
loop: {max_calls: 5005, max_spend_micros: 500250000, max_same_failures: 51},
caps: {
sandbox_max_cost_micros: 5000050000,
daily_cap_micros: 50000500000,
low_balance_micros: 5000000000
}
})
};
fetch('https://api.zode.dev/v1/proxying/settings', 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.zode.dev/v1/proxying/settings",
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([
'reset' => true,
'loop' => [
'max_calls' => 5005,
'max_spend_micros' => 500250000,
'max_same_failures' => 51
],
'caps' => [
'sandbox_max_cost_micros' => 5000050000,
'daily_cap_micros' => 50000500000,
'low_balance_micros' => 5000000000
]
]),
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.zode.dev/v1/proxying/settings"
payload := strings.NewReader("{\n \"reset\": true,\n \"loop\": {\n \"max_calls\": 5005,\n \"max_spend_micros\": 500250000,\n \"max_same_failures\": 51\n },\n \"caps\": {\n \"sandbox_max_cost_micros\": 5000050000,\n \"daily_cap_micros\": 50000500000,\n \"low_balance_micros\": 5000000000\n }\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.zode.dev/v1/proxying/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reset\": true,\n \"loop\": {\n \"max_calls\": 5005,\n \"max_spend_micros\": 500250000,\n \"max_same_failures\": 51\n },\n \"caps\": {\n \"sandbox_max_cost_micros\": 5000050000,\n \"daily_cap_micros\": 50000500000,\n \"low_balance_micros\": 5000000000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zode.dev/v1/proxying/settings")
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 \"reset\": true,\n \"loop\": {\n \"max_calls\": 5005,\n \"max_spend_micros\": 500250000,\n \"max_same_failures\": 51\n },\n \"caps\": {\n \"sandbox_max_cost_micros\": 5000050000,\n \"daily_cap_micros\": 50000500000,\n \"low_balance_micros\": 5000000000\n }\n}"
response = http.request(request)
puts response.read_body{
"providers": [
{
"id": "<string>",
"name": "<string>"
}
],
"keys": {},
"loop": {
"window_seconds": 123,
"max_calls": 123,
"max_spend_micros": 123,
"max_same_failures": 123
},
"caps": {
"sandbox_max_cost_micros": 123,
"daily_cap_micros": 123,
"low_balance_micros": 123
},
"defaults": {
"loop": {
"window_seconds": 123,
"max_calls": 123,
"max_spend_micros": 123,
"max_same_failures": 123
},
"caps": {
"sandbox_max_cost_micros": 123,
"daily_cap_micros": 123,
"low_balance_micros": 123
}
},
"limits": {},
"saved": true,
"can_edit": true,
"secrets_available": true,
"max_keys_per_provider": 123
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Proxying
Change breaker and caps
Change loop breaker thresholds and spend caps (owner, admin).
Any subset. Out-of-range values are 400 invalid_request (ranges in
GET limits). null clears caps.sandbox_max_cost_micros or
caps.daily_cap_micros (no cap). reset: true starts from the
defaults. Audited as proxy.settings.update with old and new values.
PATCH
/
v1
/
proxying
/
settings
Change breaker and caps
curl --request PATCH \
--url https://api.zode.dev/v1/proxying/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"reset": true,
"loop": {
"max_calls": 5005,
"max_spend_micros": 500250000,
"max_same_failures": 51
},
"caps": {
"sandbox_max_cost_micros": 5000050000,
"daily_cap_micros": 50000500000,
"low_balance_micros": 5000000000
}
}
'import requests
url = "https://api.zode.dev/v1/proxying/settings"
payload = {
"reset": True,
"loop": {
"max_calls": 5005,
"max_spend_micros": 500250000,
"max_same_failures": 51
},
"caps": {
"sandbox_max_cost_micros": 5000050000,
"daily_cap_micros": 50000500000,
"low_balance_micros": 5000000000
}
}
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({
reset: true,
loop: {max_calls: 5005, max_spend_micros: 500250000, max_same_failures: 51},
caps: {
sandbox_max_cost_micros: 5000050000,
daily_cap_micros: 50000500000,
low_balance_micros: 5000000000
}
})
};
fetch('https://api.zode.dev/v1/proxying/settings', 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.zode.dev/v1/proxying/settings",
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([
'reset' => true,
'loop' => [
'max_calls' => 5005,
'max_spend_micros' => 500250000,
'max_same_failures' => 51
],
'caps' => [
'sandbox_max_cost_micros' => 5000050000,
'daily_cap_micros' => 50000500000,
'low_balance_micros' => 5000000000
]
]),
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.zode.dev/v1/proxying/settings"
payload := strings.NewReader("{\n \"reset\": true,\n \"loop\": {\n \"max_calls\": 5005,\n \"max_spend_micros\": 500250000,\n \"max_same_failures\": 51\n },\n \"caps\": {\n \"sandbox_max_cost_micros\": 5000050000,\n \"daily_cap_micros\": 50000500000,\n \"low_balance_micros\": 5000000000\n }\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.zode.dev/v1/proxying/settings")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"reset\": true,\n \"loop\": {\n \"max_calls\": 5005,\n \"max_spend_micros\": 500250000,\n \"max_same_failures\": 51\n },\n \"caps\": {\n \"sandbox_max_cost_micros\": 5000050000,\n \"daily_cap_micros\": 50000500000,\n \"low_balance_micros\": 5000000000\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zode.dev/v1/proxying/settings")
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 \"reset\": true,\n \"loop\": {\n \"max_calls\": 5005,\n \"max_spend_micros\": 500250000,\n \"max_same_failures\": 51\n },\n \"caps\": {\n \"sandbox_max_cost_micros\": 5000050000,\n \"daily_cap_micros\": 50000500000,\n \"low_balance_micros\": 5000000000\n }\n}"
response = http.request(request)
puts response.read_body{
"providers": [
{
"id": "<string>",
"name": "<string>"
}
],
"keys": {},
"loop": {
"window_seconds": 123,
"max_calls": 123,
"max_spend_micros": 123,
"max_same_failures": 123
},
"caps": {
"sandbox_max_cost_micros": 123,
"daily_cap_micros": 123,
"low_balance_micros": 123
},
"defaults": {
"loop": {
"window_seconds": 123,
"max_calls": 123,
"max_spend_micros": 123,
"max_same_failures": 123
},
"caps": {
"sandbox_max_cost_micros": 123,
"daily_cap_micros": 123,
"low_balance_micros": 123
}
},
"limits": {},
"saved": true,
"can_edit": true,
"secrets_available": true,
"max_keys_per_provider": 123
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}{
"error": {
"code": "not_found",
"message": "<string>"
}
}Authorizations
An API key (zode_tok_...). Create one in the console under API keys (https://console.zode.dev/tokens), or with zode login.
Response
Updated proxying view
⌘I