Docs API reference Load balancers Load balancers Load balancers Managed L4/L7 load balancer for your cloud servers: services, health checks, targets, free Let's Encrypt certificates, metrics. EU regions.
# GET /cloud/load-balancer-types List load balancer sizes and prices Scope: cloud_read listLoadBalancerTypes OpenAPI for this operation
Orderable sizes (small/medium/large) with limits, regions and EUR prices per cycle (excl. VAT); list_amount is the strike-through list price.
Responses 200 Sizes — data: array<object> 401 Missing, invalid or revoked key
Examples curl CLI Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers List load balancers Scope: cloud_read listLoadBalancers OpenAPI for this operation
Parameters Field in Type Description pagequery integer limitquery integer statusquery string
Responses 200 Load balancers — data: array<LoadBalancer> 401 Missing, invalid or revoked key
Examples curl CLI Terraform Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers Order a load balancer Scope: cloud_order createLoadBalancer OpenAPI for this operation
Orders and pays from the account balance (same money rules as servers): "confirm": true, an Idempotency-Key header, dry_run for a quote. Ready in about a minute; then add services and targets.
Parameters Field in Type Description Idempotency-Keyheader string
Request body Field Type Description sizestring (small, medium, large) product_idinteger regionstring (eu-de-1, eu-de-2, eu-fi-1) cyclestring end_customer_idinteger dry_runboolean confirmboolean project_idinteger Optional project for the new service(s) (0 = default project). Checked before the order: unknown id = 404 project_not_found (GyroAPI order endpoints) or 422 checkout_blocked with [project_not_found] (POST /orders).
Responses 201 Ordered — data: object 200 Quote (dry_run) — data: object 400 Malformed request (e.g. missing Idempotency-Key) 401 Missing, invalid or revoked key 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{"size": "small", "product_id": 1, "region": "eu-de-1", "cycle": "string", "end_customer_id": 1, "dry_run": true, "confirm": true, "project_id": 1}'Copy gyro lb create --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
h["Idempotency-Key"] = str(uuid.uuid4())
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", headers=h, json={"size": "small", "product_id": 1, "region": "eu-de-1", "cycle": "string", "end_customer_id": 1, "dry_run": True, "confirm": True, "project_id": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
"Idempotency-Key": crypto.randomUUID(),
},
body: JSON.stringify({"size": "small", "product_id": 1, "region": "eu-de-1", "cycle": "string", "end_customer_id": 1, "dry_run": true, "confirm": true, "project_id": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id} Get a load balancer Scope: cloud_read getLoadBalancer OpenAPI for this operation
Parameters Field in Type Description id required path integer
Responses 200 Load balancer — data: LoadBalancer 401 Missing, invalid or revoked key 404 Not found — also returned for objects owned by someone else
Examples curl CLI Terraform Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id} Delete (cancel) a load balancer Scope: cloud_delete deleteLoadBalancer OpenAPI for this operation
confirm=true required. immediate=true cancels now: traffic and billing stop, the load balancer and its certificates are deleted permanently at once. Without immediate a cancellation request is filed.
Parameters Field in Type Description id required path integer confirmquery boolean immediatequery boolean
Responses 202 Cancelling — data: object 401 Missing, invalid or revoked key 404 Not found — also returned for objects owned by someone else 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/services List services (ports) of a load balancer Scope: services_read typed_get_load_balancers__id__services OpenAPI for this operation
Services with health check and HTTP options, plus the certificates of this load balancer and its limits.
Parameters Field in Type Description id required path integer Service id
Responses 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy gyro lb service list 12345Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/services Add a service Scope: services_write typed_post_load_balancers__id__services OpenAPI for this operation
Adds a listener. HTTPS needs at least one certificate of this load balancer; TLS ends at the load balancer and targets get HTTP. Use TCP 443 for passthrough.
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description protocol required string (tcp, http, https) listen_port required integer Port the load balancer listens on destination_port required integer Port on the targets proxyprotocolboolean Send PROXY protocol header to targets hc_protocolstring (tcp, http) Health check type hc_portinteger hc_intervalinteger 3-60 s hc_timeoutinteger 1-30 s, below interval hc_retriesinteger 0-5 hc_pathstring HTTP check path (starts with /) hc_domainstring HTTP check Host header hc_status_codesstring Comma separated, e.g. 2??,3?? hc_tlsboolean HTTP check over TLS stickyboolean Sticky sessions (cookie) cookie_namestring cookie_lifetimeinteger idle_timeoutinteger Idle timeout (s) certificatesstring HTTPS: comma separated certificate ids of this load balancer redirect_httpboolean HTTPS: redirect port 80 to HTTPS (port 80 must be free) confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"protocol": "tcp", "listen_port": 1, "destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}'Copy gyro lb service add 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", headers=h, json={"protocol": "tcp", "listen_port": 1, "destination_port": 1, "proxyprotocol": True, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": True, "sticky": True, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": True, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"protocol": "tcp", "listen_port": 1, "destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# PATCH /cloud/load-balancers/{id}/services/{port} Update a service Scope: services_write typed_patch_load_balancers__id__services__port OpenAPI for this operation
Changes options of the service on {port}. The protocol cannot change (delete and add).
Parameters Field in Type Description id required path integer Service id port required path string Listen port
Request body Field Type Description destination_portinteger Port on the targets proxyprotocolboolean Send PROXY protocol header to targets hc_protocolstring (tcp, http) Health check type hc_portinteger hc_intervalinteger 3-60 s hc_timeoutinteger 1-30 s, below interval hc_retriesinteger 0-5 hc_pathstring HTTP check path (starts with /) hc_domainstring HTTP check Host header hc_status_codesstring Comma separated, e.g. 2??,3?? hc_tlsboolean HTTP check over TLS stickyboolean Sticky sessions (cookie) cookie_namestring cookie_lifetimeinteger idle_timeoutinteger Idle timeout (s) certificatesstring HTTPS: comma separated certificate ids of this load balancer redirect_httpboolean HTTPS: redirect port 80 to HTTPS (port 80 must be free) confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}'Copy gyro lb service update 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.patch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", headers=h, json={"destination_port": 1, "proxyprotocol": True, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": True, "sticky": True, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": True, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", {
method: "PATCH",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"destination_port": 1, "proxyprotocol": true, "hc_protocol": "tcp", "hc_port": 1, "hc_interval": 1, "hc_timeout": 1, "hc_retries": 1, "hc_path": "string", "hc_domain": "string", "hc_status_codes": "string", "hc_tls": true, "sticky": true, "cookie_name": "string", "cookie_lifetime": 1, "idle_timeout": 1, "certificates": "string", "redirect_http": true, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/services/{port} Delete a service Scope: services_write typed_delete_load_balancers__id__services__port OpenAPI for this operation
Stops listening on {port}. Needs "confirm": true.
Parameters Field in Type Description id required path integer Service id port required path string Listen port
Request body Field Type Description confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Copy gyro lb service delete 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services/1", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/targets List targets with health Scope: services_read typed_get_load_balancers__id__targets OpenAPI for this operation
Targets, per-service health (healthy/unhealthy/unknown), and the cloud servers / dedicated IPs that can be added.
Parameters Field in Type Description id required path integer Service id
Responses 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy gyro lb target list 12345Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/targets Add a target Scope: services_write typed_post_load_balancers__id__targets OpenAPI for this operation
type=server (server = your cloud server id, same region), type=all (all your cloud servers, new ones join automatically) or type=ip (your dedicated server IP). use_private_ip needs a private network attached.
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description type required string (server, all, ip) serverinteger Cloud server id (type=server) ipstring Dedicated server IP (type=ip) use_private_ipboolean confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type": "server", "server": 1, "ip": "string", "use_private_ip": true, "confirm": true}'Copy gyro lb target add 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", headers=h, json={"type": "server", "server": 1, "ip": "string", "use_private_ip": True, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"type": "server", "server": 1, "ip": "string", "use_private_ip": true, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/targets Remove a target Scope: services_write typed_delete_load_balancers__id__targets OpenAPI for this operation
Same fields as add, in the query string (?type=server&server=123&confirm=true) or the JSON body. Needs "confirm": true.
Parameters Field in Type Description id required path integer Service id typequery string server | all | ip serverquery string Cloud server id ipquery string Dedicated server IP
Request body Field Type Description typestring serverinteger ipstring confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"type": "string", "server": 1, "ip": "string", "confirm": true}'Copy gyro lb target remove 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", headers=h, json={"type": "string", "server": 1, "ip": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"type": "string", "server": 1, "ip": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/certificates List certificates Scope: services_read typed_get_load_balancers__id__certificates OpenAPI for this operation
Uploaded and Let's Encrypt certificates (Let's Encrypt ones renew automatically), a pending Let's Encrypt request and the validation redirect base URL.
Parameters Field in Type Description id required path integer Service id
Responses 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy gyro lb cert list 12345Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/certificates Upload a certificate Scope: services_write typed_post_load_balancers__id__certificates OpenAPI for this operation
PEM certificate chain + unencrypted private key. The key is sent to the load balancer only; it is never stored or logged by the panel.
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description namestring certificate required string PEM chain private_key required string PEM key (unencrypted) confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"name": "string", "certificate": "string", "private_key": "string", "confirm": true}'Copy gyro lb cert upload 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", headers=h, json={"name": "string", "certificate": "string", "private_key": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"name": "string", "certificate": "string", "private_key": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/certificates/letsencrypt Request a free Let's Encrypt certificate Scope: services_write typed_post_load_balancers__id__certificates_letsencrypt OpenAPI for this operation
Up to 10 names whose A record points to this load balancer. Your targets must redirect /.well-known/acme-challenge/<token> to the redirect base shown in GET certificates; answer acme=waiting lists the per-name check, fix the redirect and call verify.
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description domains required string Comma separated names confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"domains": "string", "confirm": true}'Copy gyro lb cert letsencrypt 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", headers=h, json={"domains": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"domains": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/certificates/letsencrypt Cancel a pending Let's Encrypt request Scope: services_write typed_delete_load_balancers__id__certificates_letsencrypt OpenAPI for this operation
Drops the pending order. Needs "confirm": true.
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Copy gyro lb cert cancel 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/certificates/letsencrypt/verify Continue a pending Let's Encrypt request Scope: services_write typed_post_load_balancers__id__certificates_letsencrypt_verify OpenAPI for this operation
Re-checks the redirect, lets the CA validate and uploads the certificate (acme=issued).
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt/verify' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Copy gyro lb cert verify 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt/verify", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/letsencrypt/verify", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/certificates/{cid} Delete a certificate Scope: services_write typed_delete_load_balancers__id__certificates__cid OpenAPI for this operation
Only certificates not used by a service. Needs "confirm": true.
Parameters Field in Type Description id required path integer Service id cid required path string Certificate id
Request body Field Type Description confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Copy gyro lb cert delete 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates/1", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/settings Algorithm, reverse DNS, private network Scope: services_read typed_get_load_balancers__id__settings OpenAPI for this operation
Current algorithm, PTR records, your private networks in the same region (attached or not) and limits.
Parameters Field in Type Description id required path integer Service id
Responses 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy gyro lb settings 12345Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# PUT /cloud/load-balancers/{id}/algorithm Change the balancing algorithm Scope: services_write typed_put_load_balancers__id__algorithm OpenAPI for this operation
round_robin or least_connections.
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description algorithm required string (round_robin, least_connections) confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/algorithm' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"algorithm": "round_robin", "confirm": true}'Copy gyro lb algorithm set 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/algorithm", headers=h, json={"algorithm": "round_robin", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/algorithm", {
method: "PUT",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"algorithm": "round_robin", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# PUT /cloud/load-balancers/{id}/rdns Set reverse DNS Scope: services_write typed_put_load_balancers__id__rdns OpenAPI for this operation
PTR for one of the load balancer's IPs; empty ptr restores the default.
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description ip required string ptrstring confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/rdns' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"ip": "string", "ptr": "string", "confirm": true}'Copy gyro lb rdns set 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/rdns", headers=h, json={"ip": "string", "ptr": "string", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/rdns", {
method: "PUT",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"ip": "string", "ptr": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# POST /cloud/load-balancers/{id}/network Attach to a private network Scope: services_write typed_post_load_balancers__id__network OpenAPI for this operation
One of your private networks in the same region (GET settings).
Parameters Field in Type Description id required path integer Service id
Request body Field Type Description network required integer confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"network": 1, "confirm": true}'Copy gyro lb network attach 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network", headers=h, json={"network": 1, "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"network": 1, "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# DELETE /cloud/load-balancers/{id}/network/{nid} Detach from a private network Scope: services_write typed_delete_load_balancers__id__network__nid OpenAPI for this operation
Targets that use private IPs must be removed first. Needs "confirm": true.
Parameters Field in Type Description id required path integer Service id nid required path string Private network id
Request body Field Type Description confirmboolean
Responses 202 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network/1' \
-H "Authorization: Bearer $GYRO_TOKEN" \
-H "Content-Type: application/json" \
-d '{"confirm": true}'Copy gyro lb network detach 12345 --help # all flagsCopy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network/1", headers=h, json={"confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/network/1", {
method: "DELETE",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({"confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);# GET /cloud/load-balancers/{id}/metrics Load balancer metrics Scope: services_read typed_get_load_balancers__id__metrics OpenAPI for this operation
Open connections, new connections/s, requests/s, bandwidth in/out (Mbit/s).
Parameters Field in Type Description id required path integer Service id periodquery string 24h | 7d | 30d
Responses 200 Tool data / result — data: object 404 Not found — also returned for objects owned by someone else 409 State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight) 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Examples curl CLI Terraform Python JavaScript
Copy curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics' \
-H "Authorization: Bearer $GYRO_TOKEN"Copy gyro lb metrics 12345Copy # resource gyro_load_balancer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/load_balancer
# Two cloud servers behind a managed load balancer (EU regions: eu-de-1, eu-de-2, eu-fi-1).
resource "gyro_server" "web" {
count = 2
plan = "standart-2-4"
region = "eu-de-1"
image = "ubuntu-24.04"
hostname = "web-${count.index + 1}.example.com"
confirm_order = true
}
resource "gyro_load_balancer" "web" {
size = "small" # small | medium | large (GET /cloud/load-balancer-types)
region = "eu-de-1"
algorithm = "least_connections"
confirm_order = true # creating a load balancer is a paid order from your account balance
services = [
{
protocol = "http"
listen_port = 80
destination_port = 80
sticky_sessions = true
health_check = { protocol = "http", path = "/healthz", interval = 10, timeout = 5, retries = 3 }
},
{
# TLS passthrough: certificates stay on the servers
protocol = "tcp"
listen_port = 443
destination_port = 443
},
]
targets = [for s in gyro_server.web : { type = "server", server_id = tonumber(s.id) }]
}
output "load_balancer_ip" {
value = gyro_load_balancer.web.ipv4 # point your A record here
}Copy import os, uuid, requests
h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])Copy const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics", {
method: "GET",
headers: {
"Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
},
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);