curl --request PATCH \
--url https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"replica_count": 3,
"flavor": "e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1",
"tags": {
"environment": "production",
"team": "backend"
}
}
'import requests
url = "https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id}"
payload = {
"replica_count": 3,
"flavor": "e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1",
"tags": {
"environment": "production",
"team": "backend"
}
}
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({
replica_count: 3,
flavor: 'e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1',
tags: {environment: 'production', team: 'backend'}
})
};
fetch('https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{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://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{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([
'replica_count' => 3,
'flavor' => 'e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1',
'tags' => [
'environment' => 'production',
'team' => 'backend'
]
]),
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://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id}"
payload := strings.NewReader("{\n \"replica_count\": 3,\n \"flavor\": \"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\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://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"replica_count\": 3,\n \"flavor\": \"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{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 \"replica_count\": 3,\n \"flavor\": \"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n }\n}"
response = http.request(request)
puts response.read_body{
"load_balancer": {
"id": "4e1f8c2a-9b3d-4f6e-8a1c-2d5e7f9a0b3c",
"crn": "crn:loadbalancer:sa-saopaulo-1:my-account:load-balancer/web-lb",
"account_id": "6f9619ff-8b86-4d01-b42d-00cf4fc964ff",
"name": "web-lb",
"type": "application",
"status": "active",
"faults": [],
"subnet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crn": "crn:network:sa-saopaulo-1:my-account:vpc/prod/subnet/prod-web",
"vpc": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crn": "crn:network:sa-saopaulo-1:my-account:vpc/prod",
"name": "prod",
"cidr_ipv4": "10.0.0.0/16",
"tags": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "Production VPC for web and app tiers",
"cidr_ipv6": "2a13:9500:1a6:100::/60"
},
"route_table": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crn": "crn:network:sa-saopaulo-1:my-account:vpc/prod/route-table/prod-private-rt",
"name": "prod-private-rt"
},
"name": "prod-web",
"cidr_ipv4": "10.0.1.0/24",
"gateway_ipv4": "10.0.1.1",
"tags": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "Public web-tier subnet",
"cidr_ipv6": "2a13:9500:1a6:100::/64",
"gateway_ipv6": "2a13:9500:1a6:100::1"
},
"flavor_id": "e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1",
"replica_count": 2,
"tags": {
"environment": "production",
"team": "backend"
},
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z",
"internal_ipv4": "203.0.113.50",
"internal_ipv6": "2001:db8::32",
"public_ipv6": "2a13:9500:1a6:101::a",
"floating_ip_id": "f6a7b8c9-d0e1-4234-f5a6-b7c8d9e0f1a2",
"dns_name": "web-lb.my-account.lb.sa-saopaulo-1.basaltic.sh"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Invalid request parameters",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}Scale or resize a load balancer
curl --request PATCH \
--url https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"replica_count": 3,
"flavor": "e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1",
"tags": {
"environment": "production",
"team": "backend"
}
}
'import requests
url = "https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id}"
payload = {
"replica_count": 3,
"flavor": "e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1",
"tags": {
"environment": "production",
"team": "backend"
}
}
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({
replica_count: 3,
flavor: 'e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1',
tags: {environment: 'production', team: 'backend'}
})
};
fetch('https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{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://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{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([
'replica_count' => 3,
'flavor' => 'e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1',
'tags' => [
'environment' => 'production',
'team' => 'backend'
]
]),
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://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id}"
payload := strings.NewReader("{\n \"replica_count\": 3,\n \"flavor\": \"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\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://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"replica_count\": 3,\n \"flavor\": \"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://loadbalancer.{region}.basaltic.sh/v1/load-balancers/{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 \"replica_count\": 3,\n \"flavor\": \"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1\",\n \"tags\": {\n \"environment\": \"production\",\n \"team\": \"backend\"\n }\n}"
response = http.request(request)
puts response.read_body{
"load_balancer": {
"id": "4e1f8c2a-9b3d-4f6e-8a1c-2d5e7f9a0b3c",
"crn": "crn:loadbalancer:sa-saopaulo-1:my-account:load-balancer/web-lb",
"account_id": "6f9619ff-8b86-4d01-b42d-00cf4fc964ff",
"name": "web-lb",
"type": "application",
"status": "active",
"faults": [],
"subnet": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crn": "crn:network:sa-saopaulo-1:my-account:vpc/prod/subnet/prod-web",
"vpc": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crn": "crn:network:sa-saopaulo-1:my-account:vpc/prod",
"name": "prod",
"cidr_ipv4": "10.0.0.0/16",
"tags": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "Production VPC for web and app tiers",
"cidr_ipv6": "2a13:9500:1a6:100::/60"
},
"route_table": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"crn": "crn:network:sa-saopaulo-1:my-account:vpc/prod/route-table/prod-private-rt",
"name": "prod-private-rt"
},
"name": "prod-web",
"cidr_ipv4": "10.0.1.0/24",
"gateway_ipv4": "10.0.1.1",
"tags": {},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"description": "Public web-tier subnet",
"cidr_ipv6": "2a13:9500:1a6:100::/64",
"gateway_ipv6": "2a13:9500:1a6:100::1"
},
"flavor_id": "e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1",
"replica_count": 2,
"tags": {
"environment": "production",
"team": "backend"
},
"created_at": "2026-01-15T09:30:00Z",
"updated_at": "2026-01-15T09:30:00Z",
"internal_ipv4": "203.0.113.50",
"internal_ipv6": "2001:db8::32",
"public_ipv6": "2a13:9500:1a6:101::a",
"floating_ip_id": "f6a7b8c9-d0e1-4234-f5a6-b7c8d9e0f1a2",
"dns_name": "web-lb.my-account.lb.sa-saopaulo-1.basaltic.sh"
}
}{
"error": {
"code": "INVALID_INPUT",
"message": "Invalid request parameters",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Authentication required",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "ACCESS_DENIED",
"message": "You don't have permission to perform this action",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Resource not found",
"request_id": "550e8400-e29b-41d4-a716-446655440000"
}
}loadbalancer:UpdateLoadBalancer. See LOADBALANCER permissions for the full list, what each one covers, and an example policy.Authorizations
An OAuth 2.0 bearer token, sent as Authorization: Bearer <token>.
This is the recommended way to authenticate.
Get one by exchanging a service account's access key pair at
POST /v1/oauth/token with grant_type=client_credentials. It is the
standard client-credentials grant, so any OAuth-aware library will
obtain and refresh it for you.
curl -s -u "$KEY_ID:$SECRET" -d grant_type=client_credentials \
https://iam.basaltic.sh/v1/oauth/token
Tokens last an hour by default. The same access key pair is separately your AWS SigV4 credential for the S3-compatible object endpoint, which speaks nothing else.
Path Parameters
"4e1f8c2a-9b3d-4f6e-8a1c-2d5e7f9a0b3c"
Body
Names are fixed at creation because they form the CRN used by IAM policies. Sending name in an update, including an unchanged, empty or null value, returns a validation error.
Resize the set of load balancer instances. Scale-out provisions the new replicas in sequence; scale-in removes the highest-indexed replicas best-effort. 1..10.
1 <= x <= 103
Resize each replica to a different compute flavor. Must be a loadbalancer-family flavor.
A running instance cannot change size in place, so the request records the new size and returns; the replicas already up are then replaced one at a time in the background. The load balancer temporarily runs one replica over replica_count while it does: the extra replica comes up on the new flavor and starts serving before any replica on the old one is retired, so the number serving never drops below replica_count — a resize does not cost you capacity, at any replica count.
Expect it to take several minutes, and poll GET /v1/load-balancers/{id}/replicas to watch: a replica has been replaced when its instance_id changes, and the resize is done when every flavor there matches this one.
The one exception is a load balancer already at the maximum of 10 replicas, which has nowhere to grow. There the replicas are replaced in place and 9 serve while each replacement boots.
Rejected up front if the account does not have the compute quota for the replacement replica, so a resize cannot half-apply and leave the load balancer short.
"e5f6a7b8-c9d0-4123-e4f5-a6b7c8d9e0f1"
Show child attributes
Show child attributes
{
"environment": "production",
"team": "backend"
}
Response
OK
Show child attributes
Show child attributes