OpenAPI Türkçe gyrohosting.com ↗

Servers

Cloud servers you own. Creating one places an order paid from your account balance.

#GET/cloud/servers

List cloud serversScope: cloud_readlistServersOpenAPI for this operation

Parameters

FieldinTypeDescription
statusquerystring (active, waiting, inprocess, suspended, cancelled)
pagequeryinteger
limitqueryinteger

Responses

200Servers (without live state) — data: array<Server>
401Missing, invalid or revoked key

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server list
# resource gyro_server: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server
# Pick a product by plan + region (see gyro_products / gyro_locations) ...
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "eu-de-1"
  image         = "debian-12"
  hostname      = "web-1.example.com"
  ssh_key_ids   = [tonumber(gyro_ssh_key.laptop.id)]
  power_state   = "running"
  confirm_order = true # creating a server is a paid order from your account balance
}

# ... or by product id from the catalog, e.g. the first product in stock in Helsinki.
data "gyro_products" "helsinki" {
  region         = "eu-fi-1"
  available_only = true
}

resource "gyro_server" "db" {
  product_id    = data.gyro_products.helsinki.products[0].id
  image         = "ubuntu-24.04"
  confirm_order = true
}

output "web_ipv4" {
  value = gyro_server.web.ipv4
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers", {
  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/servers

Create (order) a cloud serverScope: cloud_ordercreateServerOpenAPI for this operation

Places an order and pays it from your account balance (never from a stored card). Safety rules:

  • send "dry_run": true first to get a price quote; nothing is created;
  • a real order needs "confirm": true and an Idempotency-Key header — retrying with the same key and body returns the first answer (Idempotency-Replayed: true) instead of a second order;
  • the operator may cap the number of servers per account (409 server_limit).

Provisioning is asynchronous (typically under a minute): poll GET /cloud/servers/{id} until status is active and live.power_state is running.

Prepaid products (billing: prepaid, e.g. tr-ist-1): cycle is ignored; the order total is 0 and usage is charged hourly from the balance (at most the monthly price per month). The balance must cover the first 24 hours, otherwise 422 with the amount to top up (GET /cloud/billing/topup-url). During the first 7 days a new account may run at most 5 prepaid servers and 1 container environment (raised by a support ticket; see GET /cloud/account/limits). Over the limit: 422 limit_exceeded with details.how_to_increase; a dry_run quote shows the same as quote.limit_exceeded.

Batch (2.21.0): quantity creates N servers in one order (one invoice), each a separate service; name (with {n}) and tags label them. app installs a one-click app on each.

Parameters

FieldinTypeDescription
Idempotency-Key requiredheaderstringUnique per logical request (e.g. a UUID). Replays within 24 hours return the stored answer.

Request body

FieldTypeDescription
product_idintegerFrom GET /cloud/products (or give plan + region)
planstringPlan name from GET /cloud/products
regionstringRegion from GET /cloud/locations
server_typestringDeprecated alias of plan
locationstringDeprecated alias of region
cyclestring (monthly, quarterly, semiannually, annually)
imagestring
ssh_keysarray<integer>Ids from /cloud/ssh-keys. Global regions: one key, installed at creation. tr-ist-1: up to 10 keys, installed for root at creation through cloud-init (ssh_keys on GET /cloud/servers/{id} lists their fingerprints and key ids).
hostnamestring In a batch {n} is replaced with 1..N (e.g. web-{n}.example.com); without {n} -1, -2... is appended.
user_datastringcloud-init user data: #cloud-config or a #! script, max 32 KiB. Accepted in every region (tr-ist-1 since 2.14.0). Ignored when a one-click application is chosen on the product.
dry_runboolean
confirmbooleanMust be true to place a paid order
end_customer_idintegerReseller main key: assign the new server to this end-customer
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).
quantityintegerCreate N identical servers in ONE order (default 1). Upper limit per request: 25 by default (operator setting / per-account override; 422 invalid_quantity above it). The server cap and the prepaid 24-hour balance rule count all N.
namestringService name (nickname, shown in the panel, console and API as nickname). {n} is replaced with 1..N in a batch; without {n} a batch appends -1, -2...
tagsarray<any>Labels for every new server (max 10, 24 characters each).
appstringOne-click app id from GET /cloud/apps, installed when the server is up (products that offer apps). Not with user_data.
app_domainstringDomain of the app (its A record must point to the new server); quantity 1 only.

Responses

200Dry-run quote (nothing created) — data: object
202Order placed and paid; the server is being provisioned — data: CreateServerResult
400Malformed request (e.g. missing Idempotency-Key)
401Missing, invalid or revoked key
402Account balance does not cover the order (insufficient_balance)
403Key lacks the scope, IP not allowed, or feature disabled
409State conflict (server_locked, not_actionable, ssh_key_exists, server_limit, idempotency_in_flight)
422confirm_required | limit_exceeded (new-account limit of the prepaid cloud; details = LimitHint, raise it with a support ticket) | validation errors

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"product_id": 723, "cycle": "monthly", "image": "debian-12", "ssh_keys": [12], "hostname": "web-1.example.com", "confirm": true}'
gyro server create --help    # all flags
# resource gyro_server: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server
# Pick a product by plan + region (see gyro_products / gyro_locations) ...
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "eu-de-1"
  image         = "debian-12"
  hostname      = "web-1.example.com"
  ssh_key_ids   = [tonumber(gyro_ssh_key.laptop.id)]
  power_state   = "running"
  confirm_order = true # creating a server is a paid order from your account balance
}

# ... or by product id from the catalog, e.g. the first product in stock in Helsinki.
data "gyro_products" "helsinki" {
  region         = "eu-fi-1"
  available_only = true
}

resource "gyro_server" "db" {
  product_id    = data.gyro_products.helsinki.products[0].id
  image         = "ubuntu-24.04"
  confirm_order = true
}

output "web_ipv4" {
  value = gyro_server.web.ipv4
}
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/servers", headers=h, json={"product_id": 723, "cycle": "monthly", "image": "debian-12", "ssh_keys": [12], "hostname": "web-1.example.com", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({"product_id": 723, "cycle": "monthly", "image": "debian-12", "ssh_keys": [12], "hostname": "web-1.example.com", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/servers/{id}

Get a server with its live stateScope: cloud_readgetServerOpenAPI for this operation

live is read from the platform (cached for 15 seconds) and is null while the server is not active.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (= service id in the client area)

Responses

200Server — data: ServerDetail
404Not found — also returned for objects owned by someone else

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server get 12345
# resource gyro_server: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server
# Pick a product by plan + region (see gyro_products / gyro_locations) ...
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "eu-de-1"
  image         = "debian-12"
  hostname      = "web-1.example.com"
  ssh_key_ids   = [tonumber(gyro_ssh_key.laptop.id)]
  power_state   = "running"
  confirm_order = true # creating a server is a paid order from your account balance
}

# ... or by product id from the catalog, e.g. the first product in stock in Helsinki.
data "gyro_products" "helsinki" {
  region         = "eu-fi-1"
  available_only = true
}

resource "gyro_server" "db" {
  product_id    = data.gyro_products.helsinki.products[0].id
  image         = "ubuntu-24.04"
  confirm_order = true
}

output "web_ipv4" {
  value = gyro_server.web.ipv4
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/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/servers/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}`);

#PATCH/cloud/servers/{id}

Rename a server or switch auto-renewScope: cloud_writeupdateServerOpenAPI for this operation

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (= service id in the client area)

Request body

FieldTypeDescription
hostnamestringFully qualified host name (max 63 characters)
auto_renewboolean

Responses

200Updated server — data: ServerDetail
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/servers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"hostname": "web-1.example.com", "auto_renew": true}'
gyro server update | rename 12345 --help    # all flags
# resource gyro_server: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server
# Pick a product by plan + region (see gyro_products / gyro_locations) ...
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "eu-de-1"
  image         = "debian-12"
  hostname      = "web-1.example.com"
  ssh_key_ids   = [tonumber(gyro_ssh_key.laptop.id)]
  power_state   = "running"
  confirm_order = true # creating a server is a paid order from your account balance
}

# ... or by product id from the catalog, e.g. the first product in stock in Helsinki.
data "gyro_products" "helsinki" {
  region         = "eu-fi-1"
  available_only = true
}

resource "gyro_server" "db" {
  product_id    = data.gyro_products.helsinki.products[0].id
  image         = "ubuntu-24.04"
  confirm_order = true
}

output "web_ipv4" {
  value = gyro_server.web.ipv4
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.patch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345", headers=h, json={"hostname": "web-1.example.com", "auto_renew": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345", {
  method: "PATCH",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"hostname": "web-1.example.com", "auto_renew": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/servers/{id}

Delete (cancel) a serverScope: cloud_deletedeleteServerOpenAPI for this operation

Requires confirm=true (query or body). Two modes:

  • default: files a cancellation request (status: cancellation_requested). The server keeps running and billing continues until the request is processed by the panel's automation (daily, business hours);
  • immediate=true: cancels now (status: cancelling, becomes cancelled within about a minute) - billing stops, the server is powered off at once and destroyed with its data after the grace period (3 days). Same effect as an approved "cancel now" request in the panel. The operator can disable this.

Calling it again is safe.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (= service id in the client area)
confirm requiredqueryboolean
immediatequerybooleantrue = cancel now instead of filing a request

Responses

202Cancellation requested (default) or cancelled (immediate) — 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/servers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server delete 12345
# resource gyro_server: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server
# Pick a product by plan + region (see gyro_products / gyro_locations) ...
resource "gyro_server" "web" {
  plan          = "standart-2-4"
  region        = "eu-de-1"
  image         = "debian-12"
  hostname      = "web-1.example.com"
  ssh_key_ids   = [tonumber(gyro_ssh_key.laptop.id)]
  power_state   = "running"
  confirm_order = true # creating a server is a paid order from your account balance
}

# ... or by product id from the catalog, e.g. the first product in stock in Helsinki.
data "gyro_products" "helsinki" {
  region         = "eu-fi-1"
  available_only = true
}

resource "gyro_server" "db" {
  product_id    = data.gyro_products.helsinki.products[0].id
  image         = "ubuntu-24.04"
  confirm_order = true
}

output "web_ipv4" {
  value = gyro_server.web.ipv4
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/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/servers/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/servers/{id}/disks

List the server's additional disksScope: cloud_readlistServerDisksOpenAPI for this operation

Two classes: ssd (fast) and hdd (large storage for backups, archives and media; do not run databases on it). Additional disks are billed per GB hourly from the prepaid balance (classes.<class>.per_gb_monthly_eur, monthly / 672), from the hour they are added until they are removed; each disk at least pricing.minimum_hours. Up to 4 disks per server and classes.<class>.max_gb GB per class; sizes are multiples of step_gb. A new disk is empty (partition, format and mount it inside the server). Reinstalling the server removes the additional disks.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)

Responses

200OK — data: ServerDisks
404Not found — also returned for objects owned by someone else
409not_actionable (suspended / busy / snapshots exist)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
501not_supported (not a tr-ist-1 Gyro Compute server)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server disk list 12345
# resource gyro_server_disk: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_disk
# Fast SSD disk for data (grow in place by raising size_gb; never shrinks)
resource "gyro_server_disk" "data" {
  server_id = gyro_server.web.id
  size_gb   = 100
}

# Large storage (HDD) for backups / archives / media - when the hdd class is on sale
resource "gyro_server_disk" "archive" {
  server_id = gyro_server.web.id
  size_gb   = 500
  class     = "hdd"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.get("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks", {
  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/servers/{id}/disks

Add an additional diskScope: cloud_writeaddServerDiskOpenAPI for this operation

Two classes: ssd (fast) and hdd (large storage for backups, archives and media; do not run databases on it). Additional disks are billed per GB hourly from the prepaid balance (classes.<class>.per_gb_monthly_eur, monthly / 672), from the hour they are added until they are removed; each disk at least pricing.minimum_hours. Up to 4 disks per server and classes.<class>.max_gb GB per class; sizes are multiples of step_gb. A new disk is empty (partition, format and mount it inside the server). Reinstalling the server removes the additional disks. Prepaid tr-ist-1 servers only; not while the server is suspended.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)

Request body

FieldTypeDescription
size_gb requiredinteger
classstring (ssd, hdd)ssd (fast) or hdd (large storage; see classes.hdd.on_sale)

Responses

201OK — data: ServerDisks
404Not found — also returned for objects owned by someone else
409not_actionable (suspended / busy / snapshots exist)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
501not_supported (not a tr-ist-1 Gyro Compute server)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"size_gb": 1, "class": "ssd"}'
gyro server disk add 12345 --help    # all flags
# resource gyro_server_disk: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_disk
# Fast SSD disk for data (grow in place by raising size_gb; never shrinks)
resource "gyro_server_disk" "data" {
  server_id = gyro_server.web.id
  size_gb   = 100
}

# Large storage (HDD) for backups / archives / media - when the hdd class is on sale
resource "gyro_server_disk" "archive" {
  server_id = gyro_server.web.id
  size_gb   = 500
  class     = "hdd"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks", headers=h, json={"size_gb": 1, "class": "ssd"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"size_gb": 1, "class": "ssd"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#PUT/cloud/servers/{id}/disks/{disk}

Grow an additional diskScope: cloud_writeresizeServerDiskOpenAPI for this operation

Grows the disk to size_gb (never shrinks; not while snapshots exist). Extend the partition / file system inside the server afterwards.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)
disk requiredpathintegerDisk id (from GET /cloud/servers/{id}/disks)

Request body

FieldTypeDescription
size_gb requiredinteger

Responses

200OK — data: ServerDisks
404Not found — also returned for objects owned by someone else
409not_actionable (suspended / busy / snapshots exist)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
501not_supported (not a tr-ist-1 Gyro Compute server)

Examples

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"size_gb": 1}'
gyro server disk resize 12345 --help    # all flags
# resource gyro_server_disk: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_disk
# Fast SSD disk for data (grow in place by raising size_gb; never shrinks)
resource "gyro_server_disk" "data" {
  server_id = gyro_server.web.id
  size_gb   = 100
}

# Large storage (HDD) for backups / archives / media - when the hdd class is on sale
resource "gyro_server_disk" "archive" {
  server_id = gyro_server.web.id
  size_gb   = 500
  class     = "hdd"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.put("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks/1", headers=h, json={"size_gb": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks/1", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"size_gb": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/servers/{id}/disks/{disk}

Remove an additional disk (with its data)Scope: cloud_writeremoveServerDiskOpenAPI for this operation

Detaches and deletes the disk with all its data (cannot be undone); billing stops after the current hour (minimum hours apply). Needs confirm=true.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)
disk requiredpathintegerDisk id (from GET /cloud/servers/{id}/disks)
confirm requiredqueryboolean

Responses

200OK — data: ServerDisks
404Not found — also returned for objects owned by someone else
409not_actionable (suspended / busy / snapshots exist)
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
501not_supported (not a tr-ist-1 Gyro Compute server)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server disk remove 12345
# resource gyro_server_disk: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_disk
# Fast SSD disk for data (grow in place by raising size_gb; never shrinks)
resource "gyro_server_disk" "data" {
  server_id = gyro_server.web.id
  size_gb   = 100
}

# Large storage (HDD) for backups / archives / media - when the hdd class is on sale
resource "gyro_server_disk" "archive" {
  server_id = gyro_server.web.id
  size_gb   = 500
  class     = "hdd"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks/1", headers=h, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/disks/1", {
  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}`);