Docs API başvurusu Bulut sunucular Şablonlar Şablonlar Kendi tr-ist-1 sunucularınızdan özel şablonlar (dışarıdan imaj yüklenmez)
# GET /cloud/templates Şablonlarınızı listele Kapsam: cloud_read listTemplates Bu 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 Alan in Tür Açıklama pagequery integer limitquery integer
Yanıtlar 200 OK — data: array<Template> 404 Not found — also returned for objects owned by someone else 409 template_limit, template_not_ready, busy 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/templates' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro template listKopyala # 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
}Kopyala 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"])Kopyala 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 getir Kapsam: cloud_read getTemplate Bu işlemin OpenAPI parçası
Başka hesabın şablonu 404 döner.
Parametreler Alan in Tür Açıklama id zorunlu path integer Template id
Yanıtlar 200 OK — data: Template 404 Not found — also returned for objects owned by someone else 409 template_limit, template_not_ready, busy 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/templates/12345' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro template get 12345Kopyala # 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
}Kopyala 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"])Kopyala 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ır Kapsam: cloud_write updateTemplate Bu işlemin OpenAPI parçası
Ad 1-60 karakter (harf, rakam, boşluk . _ -).
Parametreler Alan in Tür Açıklama id zorunlu path integer Template id
İstek gövdesi Alan Tür Açıklama namestring descriptionstring
Yanıtlar 200 OK — data: Template 404 Not found — also returned for objects owned by someone else 409 template_limit, template_not_ready, busy 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala 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"}'Kopyala gyro template update 12345 --help # tüm seçeneklerKopyala # 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
}Kopyala 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"])Kopyala 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 sil Kapsam: cloud_write deleteTemplate Bu işlemin OpenAPI parçası
Kalıcıdır. Şablondan açılmış sunucular etkilenmez; ücret sonraki saatten durur.
Parametreler Alan in Tür Açıklama id zorunlu path integer Template id
Yanıtlar 202 OK — data: object 404 Not found — also returned for objects owned by someone else 409 template_limit, template_not_ready, busy 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Terraform Python JavaScript
Kopyala curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/templates/12345' \
-H "Authorization: Bearer $GYRO_TOKEN"Kopyala gyro template delete 12345Kopyala # 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
}Kopyala 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"])Kopyala 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ştur Kapsam: cloud_write createTemplate Bu 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 Alan in Tür Açıklama id zorunlu path integer Server id (tr-ist-1)
İstek gövdesi Alan Tür Açıklama namestring descriptionstring modestring (snapshot, shutdown)
Yanıtlar 202 OK — data: object 404 Not found — also returned for objects owned by someone else 409 template_limit, template_not_ready, busy 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Python JavaScript
Kopyala 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"}'Kopyala gyro template create 12345 --help # tüm seçeneklerKopyala 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"])Kopyala 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 sunucu Kapsam: cloud_order createServerFromTemplate Bu 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 Alan in Tür Açıklama id zorunlu path integer Template id
İstek gövdesi Alan Tür Açıklama product_idinteger planstring hostnamestring ssh_keysarray<integer> user_datastring confirmboolean dry_runboolean project_idinteger Optional project for the new service(s) (0 = default project). Checked before the order: unknown id = 404 project_not_found (GyroAPI order endpoints) or 422 checkout_blocked with [project_not_found] (POST /orders).
Yanıtlar 202 OK — data: CreateServerResult 404 Not found — also returned for objects owned by someone else 409 template_limit, template_not_ready, busy 422 confirm_required | limit_exceeded (new-account limit of the prepaid cloud; details = LimitHint, raise it with a support ticket) | validation errors
Örnekler curl CLI Python JavaScript
Kopyala 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}'Kopyala gyro template deploy 12345 --help # tüm seçeneklerKopyala 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"])Kopyala 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 kur Kapsam: cloud_write rebuildFromTemplate Bu 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 Alan in Tür Açıklama id zorunlu path integer Template id
İstek gövdesi Alan Tür Açıklama server_id zorunlu integer user_datastring confirm zorunlu boolean
Yanıtlar 202 OK — data: object 404 Not found — also returned for objects owned by someone else 409 template_limit, template_not_ready, busy 422 Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
Örnekler curl CLI Python JavaScript
Kopyala 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}'Kopyala gyro template rebuild 12345 --help # tüm seçeneklerKopyala 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"])Kopyala 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}`);