OpenAPI Türkçe gyrohosting.com ↗

Private networks

Private networks (VPC) for Gyro Cloud Istanbul (tr-ist-1) servers: subnets, private network cards, turning a server's public IPv4 off, and the VPC gateway (NAT internet access, port forwarding, inter-subnet rule). VPCs, subnets and private traffic are free; the gateway is billed hourly from the prepaid balance while it is on (4.99 EUR per month at most).

#GET/cloud/vpcs

List private networksScope: cloud_readlistVpcsOpenAPI for this operation

tr-ist-1 only. Limits (GET /cloud/vpcs limits, raised with a support ticket): 3 VPCs per account, 4 subnets per VPC, 3 private cards per server, 20 port forwards per VPC; a server is attached to one VPC at a time (to several of its subnets). Another account's object answers 404. Also returns limits and pricing.

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Create a private networkScope: cloud_writecreateVpcOpenAPI for this operation

tr-ist-1 only. Limits (GET /cloud/vpcs limits, raised with a support ticket): 3 VPCs per account, 4 subnets per VPC, 3 private cards per server, 20 port forwards per VPC; a server is attached to one VPC at a time (to several of its subnets). Another account's object answers 404. Private range /16 to /24 inside 10.0.0.0/8, 172.16.0.0/12 or 192.168.0.0/16; the network address must be given (10.10.0.0/16, not 10.10.0.5/16). Reserved by the platform: 10.42.0.0/16, 10.43.0.0/16, 10.200.0.0/16, 10.250.0.0/16, 10.255.0.0/16. The first subnet is created with it: subnet.cidr or, when left out, the first /24 of the range (name default). Free.

Request body

FieldTypeDescription
name requiredstring
cidr requiredstring
project_idinteger
subnetobject
subnet.namestring
subnet.cidrstring

Responses

201OK — data: Vpc
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "cidr": "10.10.0.0/16", "project_id": 1, "subnet": {"name": "string", "cidr": "10.10.1.0/24"}}'
import os, uuid, requests

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

#GET/cloud/vpcs/{vpc_id}

Get a private networkScope: cloud_readgetVpcOpenAPI for this operation

Subnets, attached servers and the gateway.

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Responses

200OK — data: Vpc
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Rename a private networkScope: cloud_writeupdateVpcOpenAPI for this operation

Only the name changes (the range never changes).

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Request body

FieldTypeDescription
name requiredstring

Responses

200OK — data: Vpc
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string"}'
import os, uuid, requests

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

#DELETE/cloud/vpcs/{vpc_id}

Delete a private networkScope: cloud_writedeleteVpcOpenAPI for this operation

Permanent. Detach the server cards and delete the port forwards first (409 vpc_in_use); an open gateway is turned off. Needs "confirm": true (body or query).

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)
confirmqueryboolean

Request body

FieldTypeDescription
confirmboolean

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
import os, uuid, requests

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

List subnetsScope: cloud_readlistVpcSubnetsOpenAPI for this operation

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/subnets' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Add a subnetScope: cloud_writecreateVpcSubnetOpenAPI for this operation

/20 to /28 inside the VPC range, not overlapping another subnet. Give cidr, or prefix (default 24) for the next free range. In every subnet .1 is the gateway; .0-.4 and the last address are reserved.

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Request body

FieldTypeDescription
name requiredstring
cidrstring
prefixinteger

Responses

201OK — data: VpcSubnet
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/subnets' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "cidr": "string", "prefix": 1}'
import os, uuid, requests

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

#DELETE/cloud/vpcs/{vpc_id}/subnets/{subnet_id}

Delete a subnetScope: cloud_writedeleteVpcSubnetOpenAPI for this operation

Refused while cards are attached or a port forward targets it (409 subnet_in_use); the last subnet cannot be deleted (delete the VPC).

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)
subnet_id requiredpathstringSubnet id

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/subnets/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

#GET/cloud/vpcs/{vpc_id}/gateway

Get the VPC gatewayScope: cloud_readgetVpcGatewayOpenAPI for this operation

The gateway gives private-only servers internet access (NAT), port forwarding and the inter-subnet rule. While it is on it is billed hourly from the prepaid balance (monthly_eur / 672, at least 1 hour, never more than monthly_eur a month) and needs at least one prepaid tr-ist-1 server on the account (409 no_billing_server). Turning it off releases its public IP; refused while port forwards exist, or while private-only servers use it (409 gateway_in_use, repeat with allow_no_egress: true). Outgoing connections are logged as required by Turkish Law No. 5651 (2 years).

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Responses

200OK — data: VpcGateway
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/gateway' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Turn the VPC gateway on/off and change its settingsScope: cloud_writesetVpcGatewayOpenAPI for this operation

The gateway gives private-only servers internet access (NAT), port forwarding and the inter-subnet rule. While it is on it is billed hourly from the prepaid balance (monthly_eur / 672, at least 1 hour, never more than monthly_eur a month) and needs at least one prepaid tr-ist-1 server on the account (409 no_billing_server). Turning it off releases its public IP; refused while port forwards exist, or while private-only servers use it (409 gateway_in_use, repeat with allow_no_egress: true). Outgoing connections are logged as required by Turkish Law No. 5651 (2 years). Only the given fields change.

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Request body

FieldTypeDescription
enabledboolean
natboolean
inter_subnetstring (allow, deny)
allow_no_egressboolean

Responses

200OK — data: VpcGateway
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/gateway' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"enabled": true, "nat": true, "inter_subnet": "allow", "allow_no_egress": true}'
import os, uuid, requests

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

#GET/cloud/vpcs/{vpc_id}/port-forwards

List port forwardsScope: cloud_readlistVpcPortForwardsOpenAPI for this operation

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/port-forwards' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Forward a public port of the gatewayScope: cloud_writecreateVpcPortForwardOpenAPI for this operation

public_ip:public_port of the gateway -> target_ip:target_port inside the VPC. The gateway must be on (409 gateway_disabled); one forward per protocol + public port; at most 20.

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)

Request body

FieldTypeDescription
protocol requiredstring (tcp, udp)
public_port requiredinteger
target_ip requiredstring
target_port requiredinteger

Responses

201OK — data: VpcPortForward
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/port-forwards' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"protocol": "tcp", "public_port": 1, "target_ip": "string", "target_port": 1}'
import os, uuid, requests

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

#DELETE/cloud/vpcs/{vpc_id}/port-forwards/{pf_id}

Delete a port forwardScope: cloud_writedeleteVpcPortForwardOpenAPI for this operation

Parameters

FieldinTypeDescription
vpc_id requiredpathstringVPC id (from GET /cloud/vpcs)
pf_id requiredpathstringPort forward id

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/vpcs/1/port-forwards/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

#GET/cloud/servers/{id}/nics

List the server's private network cardsScope: cloud_readlistServerNicsOpenAPI for this operation

Private network cards of a tr-ist-1 server. Attaching is hot (no restart): the card is ready in about 10-60 s on a running server (state attaching -> ready); on a stopped server the settings apply at boot. A server can join one VPC at a time (409 other_vpc), at most 3 cards. ip empty = automatic.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/nics' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Attach the server to a subnetScope: cloud_writeattachServerNicOpenAPI for this operation

Private network cards of a tr-ist-1 server. Attaching is hot (no restart): the card is ready in about 10-60 s on a running server (state attaching -> ready); on a stopped server the settings apply at boot. A server can join one VPC at a time (409 other_vpc), at most 3 cards. ip empty = automatic.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)

Request body

FieldTypeDescription
subnet_id requiredstring
ipstring

Responses

202OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/nics' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"subnet_id": "string", "ip": "string"}'
import os, uuid, requests

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

#DELETE/cloud/servers/{id}/nics/{nic_id}

Detach a private network cardScope: cloud_writedetachServerNicOpenAPI for this operation

The address is held for 10 minutes. While the public IP is off the last card cannot be detached (409 last_network).

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)
nic_id requiredpathstringNetwork card id (from GET /cloud/servers/{id}/nics)

Responses

202OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/nics/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

#GET/cloud/servers/{id}/public-ip

Public IPv4 stateScope: cloud_readgetServerPublicIpOpenAPI for this operation

Turning the public IPv4 off makes the server reachable only from its VPC, through a gateway port forward or with the web console (which always works). Confirm with the server's current IP (confirm_ip). Needs a ready private card (409 no_private_network) and no additional IPv4 (409 extra_ips). If the VPC gateway (NAT) is off the server loses internet access: refused with 409 no_egress unless allow_no_egress: true. The address stays reserved for the server; turning it on brings the same IP.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)

Responses

200OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/public-ip' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Turn the public IPv4 onScope: cloud_writeenableServerPublicIpOpenAPI for this operation

Brings the same address back.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)

Responses

202OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/public-ip' \
  -H "Authorization: Bearer $GYRO_TOKEN"
import os, uuid, requests

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

Turn the public IPv4 offScope: cloud_writedisableServerPublicIpOpenAPI for this operation

Turning the public IPv4 off makes the server reachable only from its VPC, through a gateway port forward or with the web console (which always works). Confirm with the server's current IP (confirm_ip). Needs a ready private card (409 no_private_network) and no additional IPv4 (409 extra_ips). If the VPC gateway (NAT) is off the server loses internet access: refused with 409 no_egress unless allow_no_egress: true. The address stays reserved for the server; turning it on brings the same IP.

Parameters

FieldinTypeDescription
id requiredpathintegerServer id (tr-ist-1)

Request body

FieldTypeDescription
confirm_ip requiredstring
allow_no_egressboolean

Responses

202OK — data: object
403not_available (private networks are not enabled for this account yet) / forbidden (key limited to some servers)
404Not found — also returned for objects owned by someone else
409conflict: limit_exceeded, vpc_in_use, subnet_in_use, last_subnet, gateway_disabled, gateway_in_use, port_in_use, already_attached, other_vpc, extra_ips, no_private_network, no_egress, already_off, already_on, last_network, no_billing_server, suspended, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
503capacity / pool_exhausted (try again later)

Examples

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/public-ip' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm_ip": "string", "allow_no_egress": true}'
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/public-ip", headers=h, json={"confirm_ip": "string", "allow_no_egress": 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/public-ip", {
  method: "DELETE",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"confirm_ip": "string", "allow_no_egress": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);