OpenAPI English gyrohosting.com ↗
Markdown olarak görClaude'da aç ↗

Şablonlar

Kendi tr-ist-1 sunucularınızdan özel şablonlar (dışarıdan imaj yüklenmez)

#GET/cloud/templates

Şablonlarınızı listeleKapsam: cloud_readlistTemplatesBu işlemin OpenAPI parçası

Şablonun gerçekten kullandığı alan üzerinden GB başına aylık 0,05 € (ön ödemeli bakiyeden saatlik; ilk şablonla açılan şablon deposu hizmeti üzerinden). Silince ücret durur. En çok 10 şablon; yalnız sizin hesabınızda görünür. meta: adet, sınır, toplam GB, fiyat.

Parametreler

AlaninTürAçıklama
pagequeryinteger
limitqueryinteger

Yanıtlar

200OK — data: array<Template>
404Not found — also returned for objects owned by someone else
409template_limit, template_not_ready, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/templates' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro template list
# kaynak gyro_server_template: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_template
resource "gyro_server_template" "golden" {
  server_id   = gyro_server.web.id
  name        = "web-golden"
  description = "nginx + app, 2026-11"
}

resource "gyro_server" "web2" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = gyro_server_template.golden.image
  hostname      = "web2.example.com"
  ssh_key_ids   = [gyro_ssh_key.laptop.id]
  confirm_order = true
}
import os, uuid, requests

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

Şablonu getirKapsam: cloud_readgetTemplateBu işlemin OpenAPI parçası

Başka hesabın şablonu 404 döner.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerTemplate id

Yanıtlar

200OK — data: Template
404Not found — also returned for objects owned by someone else
409template_limit, template_not_ready, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/templates/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro template get 12345
# kaynak gyro_server_template: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_template
resource "gyro_server_template" "golden" {
  server_id   = gyro_server.web.id
  name        = "web-golden"
  description = "nginx + app, 2026-11"
}

resource "gyro_server" "web2" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = gyro_server_template.golden.image
  hostname      = "web2.example.com"
  ssh_key_ids   = [gyro_ssh_key.laptop.id]
  confirm_order = true
}
import os, uuid, requests

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

Şablonu yeniden adlandırKapsam: cloud_writeupdateTemplateBu işlemin OpenAPI parçası

Ad 1-60 karakter (harf, rakam, boşluk . _ -).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerTemplate id

İstek gövdesi

AlanTürAçıklama
namestring
descriptionstring

Yanıtlar

200OK — data: Template
404Not found — also returned for objects owned by someone else
409template_limit, template_not_ready, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/templates/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "description": "string"}'
gyro template update 12345 --help    # tüm seçenekler
# kaynak gyro_server_template: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_template
resource "gyro_server_template" "golden" {
  server_id   = gyro_server.web.id
  name        = "web-golden"
  description = "nginx + app, 2026-11"
}

resource "gyro_server" "web2" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = gyro_server_template.golden.image
  hostname      = "web2.example.com"
  ssh_key_ids   = [gyro_ssh_key.laptop.id]
  confirm_order = true
}
import os, uuid, requests

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

#DELETE/cloud/templates/{id}

Şablonu silKapsam: cloud_writedeleteTemplateBu işlemin OpenAPI parçası

Kalıcıdır. Şablondan açılmış sunucular etkilenmez; ücret sonraki saatten durur.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerTemplate id

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409template_limit, template_not_ready, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/templates/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro template delete 12345
# kaynak gyro_server_template: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_template
resource "gyro_server_template" "golden" {
  server_id   = gyro_server.web.id
  name        = "web-golden"
  description = "nginx + app, 2026-11"
}

resource "gyro_server" "web2" {
  plan          = "standart-2-4"
  region        = "tr-ist-1"
  image         = gyro_server_template.golden.image
  hostname      = "web2.example.com"
  ssh_key_ids   = [gyro_ssh_key.laptop.id]
  confirm_order = true
}
import os, uuid, requests

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

#POST/cloud/servers/{id}/templates

Sunucudan şablon oluşturKapsam: cloud_writecreateTemplateBu işlemin OpenAPI parçası

Şablonun gerçekten kullandığı alan üzerinden GB başına aylık 0,05 € (ön ödemeli bakiyeden saatlik; ilk şablonla açılan şablon deposu hizmeti üzerinden). Silince ücret durur. En çok 10 şablon; yalnız sizin hesabınızda görünür. Yalnız kök disk alınır. mode: snapshot (varsayılan) sunucu açık kalır (geçici anlık görüntü, dosya sistemi kısa süre dondurulur); mode: shutdown sunucuyu kapatıp kopyalar ve yeniden açar. Şablondan açılan sunucularda sunucu adı, IP, root parolası, SSH sunucu anahtarları ve makine kimliği yenilenir; kullanıcılarınız, dosyalarınız ve ayarlarınız kalır. Yalnız Linux. Yaklaşık bir dakikada hazır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (tr-ist-1)

İstek gövdesi

AlanTürAçıklama
namestring
descriptionstring
modestring (snapshot, shutdown)

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409template_limit, template_not_ready, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/templates' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "description": "string", "mode": "snapshot"}'
gyro template create 12345 --help    # tüm seçenekler
import os, uuid, requests

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

#POST/cloud/templates/{id}/servers

Şablondan yeni sunucuKapsam: cloud_ordercreateServerFromTemplateBu işlemin OpenAPI parçası

Şablondan kurulan normal ön ödemeli tr-ist-1 siparişi (24 saat bakiye kuralı, hesap sınırları). product_id (ya da plan) GET /cloud/products?region=tr-ist-1'den; diski şablonun min_disk_gb değerinden küçük olamaz. "confirm": true ve Idempotency-Key başlığı gerekir (teklif için dry_run).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerTemplate id

İstek gövdesi

AlanTürAçıklama
product_idinteger
planstring
hostnamestring
ssh_keysarray<integer>
user_datastring
confirmboolean
dry_runboolean
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).

Yanıtlar

202OK — data: CreateServerResult
404Not found — also returned for objects owned by someone else
409template_limit, template_not_ready, busy
422confirm_required | limit_exceeded (new-account limit of the prepaid cloud; details = LimitHint, raise it with a support ticket) | validation errors

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/templates/12345/servers' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"product_id": 1, "plan": "string", "hostname": "string", "ssh_keys": [1], "user_data": "string", "confirm": true, "dry_run": true, "project_id": 1}'
gyro template deploy 12345 --help    # tüm seçenekler
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/templates/12345/servers", headers=h, json={"product_id": 1, "plan": "string", "hostname": "string", "ssh_keys": [1], "user_data": "string", "confirm": True, "dry_run": 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/templates/12345/servers", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"product_id": 1, "plan": "string", "hostname": "string", "ssh_keys": [1], "user_data": "string", "confirm": true, "dry_run": true, "project_id": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/templates/{id}/rebuild

Sunucuyu şablonla yeniden kurKapsam: cloud_writerebuildFromTemplateBu işlemin OpenAPI parçası

tr-ist-1 sunucunuzun kök diskini şablonla değiştirir (disk en az min_disk_gb olmalı); sunucunun SSH anahtarları yeniden kurulur, yeni root parolası döner (Idempotency-Key gönderilirse dönmez). "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerTemplate id

İstek gövdesi

AlanTürAçıklama
server_id zorunluinteger
user_datastring
confirm zorunluboolean

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409template_limit, template_not_ready, busy
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/templates/12345/rebuild' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"server_id": 1, "user_data": "string", "confirm": true}'
gyro template rebuild 12345 --help    # tüm seçenekler
import os, uuid, requests

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