OpenAPI Türkçe gyrohosting.com ↗

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 pricesScope: cloud_readlistLoadBalancerTypesOpenAPI 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

200Sizes — data: array<object>
401Missing, invalid or revoked key

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancer-types' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb types
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"])
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 balancersScope: cloud_readlistLoadBalancersOpenAPI for this operation

Parameters

FieldinTypeDescription
pagequeryinteger
limitqueryinteger
statusquerystring

Responses

200Load balancers — data: array<LoadBalancer>
401Missing, invalid or revoked key

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb list
# 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
}
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"])
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 balancerScope: cloud_ordercreateLoadBalancerOpenAPI 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

FieldinTypeDescription
Idempotency-Keyheaderstring

Request body

FieldTypeDescription
sizestring (small, medium, large)
product_idinteger
regionstring (eu-de-1, eu-de-2, eu-fi-1)
cyclestring
end_customer_idinteger
dry_runboolean
confirmboolean
project_idintegerOptional 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

201Ordered — data: object
200Quote (dry_run) — data: object
400Malformed request (e.g. missing Idempotency-Key)
401Missing, invalid or revoked key
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb create --help    # all flags
# 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
}
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"])
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 balancerScope: cloud_readgetLoadBalancerOpenAPI for this operation

Parameters

FieldinTypeDescription
id requiredpathinteger

Responses

200Load balancer — data: LoadBalancer
401Missing, invalid or revoked key
404Not found — also returned for objects owned by someone else

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb get 12345
# 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
}
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"])
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 balancerScope: cloud_deletedeleteLoadBalancerOpenAPI 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

FieldinTypeDescription
id requiredpathinteger
confirmqueryboolean
immediatequeryboolean

Responses

202Cancelling — data: object
401Missing, invalid or revoked key
404Not found — also returned for objects owned by someone else
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb delete 12345
# 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
}
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"])
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 balancerScope: services_readtyped_get_load_balancers__id__servicesOpenAPI for this operation

Services with health check and HTTP options, plus the certificates of this load balancer and its limits.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/services' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb service list 12345
# 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
}
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"])
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 serviceScope: services_writetyped_post_load_balancers__id__servicesOpenAPI 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

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
protocol requiredstring (tcp, http, https)
listen_port requiredintegerPort the load balancer listens on
destination_port requiredintegerPort on the targets
proxyprotocolbooleanSend PROXY protocol header to targets
hc_protocolstring (tcp, http)Health check type
hc_portinteger
hc_intervalinteger3-60 s
hc_timeoutinteger1-30 s, below interval
hc_retriesinteger0-5
hc_pathstringHTTP check path (starts with /)
hc_domainstringHTTP check Host header
hc_status_codesstringComma separated, e.g. 2??,3??
hc_tlsbooleanHTTP check over TLS
stickybooleanSticky sessions (cookie)
cookie_namestring
cookie_lifetimeinteger
idle_timeoutintegerIdle timeout (s)
certificatesstringHTTPS: comma separated certificate ids of this load balancer
redirect_httpbooleanHTTPS: redirect port 80 to HTTPS (port 80 must be free)
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb service add 12345 --help    # all flags
# 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
}
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"])
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 serviceScope: services_writetyped_patch_load_balancers__id__services__portOpenAPI for this operation

Changes options of the service on {port}. The protocol cannot change (delete and add).

Parameters

FieldinTypeDescription
id requiredpathintegerService id
port requiredpathstringListen port

Request body

FieldTypeDescription
destination_portintegerPort on the targets
proxyprotocolbooleanSend PROXY protocol header to targets
hc_protocolstring (tcp, http)Health check type
hc_portinteger
hc_intervalinteger3-60 s
hc_timeoutinteger1-30 s, below interval
hc_retriesinteger0-5
hc_pathstringHTTP check path (starts with /)
hc_domainstringHTTP check Host header
hc_status_codesstringComma separated, e.g. 2??,3??
hc_tlsbooleanHTTP check over TLS
stickybooleanSticky sessions (cookie)
cookie_namestring
cookie_lifetimeinteger
idle_timeoutintegerIdle timeout (s)
certificatesstringHTTPS: comma separated certificate ids of this load balancer
redirect_httpbooleanHTTPS: redirect port 80 to HTTPS (port 80 must be free)
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb service update 12345 --help    # all flags
# 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
}
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"])
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 serviceScope: services_writetyped_delete_load_balancers__id__services__portOpenAPI for this operation

Stops listening on {port}. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
port requiredpathstringListen port

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb service delete 12345 --help    # all flags
# 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
}
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"])
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 healthScope: services_readtyped_get_load_balancers__id__targetsOpenAPI for this operation

Targets, per-service health (healthy/unhealthy/unknown), and the cloud servers / dedicated IPs that can be added.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/targets' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb target list 12345
# 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
}
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"])
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 targetScope: services_writetyped_post_load_balancers__id__targetsOpenAPI 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

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
type requiredstring (server, all, ip)
serverintegerCloud server id (type=server)
ipstringDedicated server IP (type=ip)
use_private_ipboolean
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb target add 12345 --help    # all flags
# 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
}
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"])
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 targetScope: services_writetyped_delete_load_balancers__id__targetsOpenAPI 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

FieldinTypeDescription
id requiredpathintegerService id
typequerystringserver | all | ip
serverquerystringCloud server id
ipquerystringDedicated server IP

Request body

FieldTypeDescription
typestring
serverinteger
ipstring
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb target remove 12345 --help    # all flags
# 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
}
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"])
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 certificatesScope: services_readtyped_get_load_balancers__id__certificatesOpenAPI 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

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/certificates' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb cert list 12345
# 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
}
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"])
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 certificateScope: services_writetyped_post_load_balancers__id__certificatesOpenAPI 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

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
namestring
certificate requiredstringPEM chain
private_key requiredstringPEM key (unencrypted)
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb cert upload 12345 --help    # all flags
# 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
}
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"])
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 certificateScope: services_writetyped_post_load_balancers__id__certificates_letsencryptOpenAPI 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

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
domains requiredstringComma separated names
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb cert letsencrypt 12345 --help    # all flags
# 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
}
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"])
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 requestScope: services_writetyped_delete_load_balancers__id__certificates_letsencryptOpenAPI for this operation

Drops the pending order. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb cert cancel 12345 --help    # all flags
# 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
}
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"])
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 requestScope: services_writetyped_post_load_balancers__id__certificates_letsencrypt_verifyOpenAPI for this operation

Re-checks the redirect, lets the CA validate and uploads the certificate (acme=issued).

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb cert verify 12345 --help    # all flags
# 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
}
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"])
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 certificateScope: services_writetyped_delete_load_balancers__id__certificates__cidOpenAPI for this operation

Only certificates not used by a service. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
cid requiredpathstringCertificate id

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb cert delete 12345 --help    # all flags
# 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
}
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"])
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 networkScope: services_readtyped_get_load_balancers__id__settingsOpenAPI for this operation

Current algorithm, PTR records, your private networks in the same region (attached or not) and limits.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Responses

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/settings' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb settings 12345
# 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
}
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"])
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 algorithmScope: services_writetyped_put_load_balancers__id__algorithmOpenAPI for this operation

round_robin or least_connections.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
algorithm requiredstring (round_robin, least_connections)
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb algorithm set 12345 --help    # all flags
# 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
}
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"])
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 DNSScope: services_writetyped_put_load_balancers__id__rdnsOpenAPI for this operation

PTR for one of the load balancer's IPs; empty ptr restores the default.

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
ip requiredstring
ptrstring
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb rdns set 12345 --help    # all flags
# 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
}
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"])
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 networkScope: services_writetyped_post_load_balancers__id__networkOpenAPI for this operation

One of your private networks in the same region (GET settings).

Parameters

FieldinTypeDescription
id requiredpathintegerService id

Request body

FieldTypeDescription
network requiredinteger
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb network attach 12345 --help    # all flags
# 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
}
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"])
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 networkScope: services_writetyped_delete_load_balancers__id__network__nidOpenAPI for this operation

Targets that use private IPs must be removed first. Needs "confirm": true.

Parameters

FieldinTypeDescription
id requiredpathintegerService id
nid requiredpathstringPrivate network id

Request body

FieldTypeDescription
confirmboolean

Responses

202Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

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}'
gyro lb network detach 12345 --help    # all flags
# 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
}
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"])
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 metricsScope: services_readtyped_get_load_balancers__id__metricsOpenAPI for this operation

Open connections, new connections/s, requests/s, bandwidth in/out (Mbit/s).

Parameters

FieldinTypeDescription
id requiredpathintegerService id
periodquerystring24h | 7d | 30d

Responses

200Tool data / result — data: object
404Not found — also returned for objects owned by someone else
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/load-balancers/12345/metrics' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro lb metrics 12345
# 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
}
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"])
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}`);