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

Tek tık uygulamalar

Bulut sunucuya tek tık uygulama kur (disk yeniden kurulur).

#GET/cloud/apps

Kurulabilir uygulamaları listeleKapsam: services_readlistAppsBu işlemin OpenAPI parçası

Yanıtlar

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

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/apps' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro api request GET /cloud/apps
# veri kaynağı gyro_apps: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/data-sources/apps
# All one-click apps
data "gyro_apps" "all" {}

# Apps listed under "Popular in Türkiye" that run on Ubuntu 24.04
data "gyro_apps" "popular" {
  popular_tr = true
  os         = "ubuntu-24.04"
}

output "popular_app_ids" {
  value = [for a in data.gyro_apps.popular.apps : a.id]
}
import os, uuid, requests

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

Uygulama kurulum durumu (hazır olunca kimlik bir kez)Kapsam: cloud_readgetAppInstallBu işlemin OpenAPI parçası

2.7.0 ile ayrıca stuck (açık ama uzun süredir haber yok), stuck_reason (no_callback = sunucu hiç haber vermedi), last_update_at, attempt, can_retry, error_code, step_text. Canlı günlük: GET /cloud/servers/{id}/app/log.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

Yanıtlar

200Status — data: object
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/app' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server app get 12345
# kaynak gyro_app_install: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/app_install
# WARNING: installing an app rebuilds the server disk
resource "gyro_app_install" "wp" {
  server_id = tonumber(gyro_server.web.id)
  app       = "wordpress"
  domain    = "blog.example.com"
  email     = "[email protected]"
}
import os, uuid, requests

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

Uygulama kur (diski yeniden kurar; confirm zorunlu; sunucu başına günde 3)Kapsam: cloud_writeinstallAppBu işlemin OpenAPI parçası

2.19.1: tr-ist-1 (Gyro Bulut İstanbul) sunucularında da. POST /cloud/servers/{id}/actions/rebuild + app ile aynıdır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

İstek gövdesi

AlanTürAçıklama
app zorunlustring
osstring
domainstring
emailstring
confirm zorunluboolean = true

Yanıtlar

202Started
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 ...)
429install_limit

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/app' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"app": "wordpress", "domain": "blog.example.com", "email": "[email protected]", "confirm": true}'
gyro server app create 12345 --help    # tüm seçenekler
# kaynak gyro_app_install: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/app_install
# WARNING: installing an app rebuilds the server disk
resource "gyro_app_install" "wp" {
  server_id = tonumber(gyro_server.web.id)
  app       = "wordpress"
  domain    = "blog.example.com"
  email     = "[email protected]"
}
import os, uuid, requests

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

#GET/cloud/servers/{id}/app/log

Son uygulama kurulumunun canlı ilerleme günlüğü (adımlar, sunucu günlüğü)Kapsam: cloud_readgetAppInstallLogBu işlemin OpenAPI parçası

after değerinden büyük kimlikli satırlar, eskiden yeniye (elinizdeki son kimlikle sorgulayın). source: step, server, system, staff. Sunucu satırları sunucudan gelen güvenilmez metindir (sırlar maskelenir); düz metin olarak gösterin.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)
afterqueryinteger
limitqueryinteger

Yanıtlar

200Log lines — data: object
404Not found — also returned for objects owned by someone else

Örnekler

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

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

Hata veren ya da yanıt vermeyen kurulumu yeniden dene (diski yeniden kurar; confirm zorunlu; sunucu başına saatte 3)Kapsam: cloud_writeretryAppInstallBu işlemin OpenAPI parçası

Son kurulum hata durumundaysa ya da stuck = true ise (uzun süre haber yok) kullanılabilir. Bulut sunucuda sunucu aynı uygulama, işletim sistemi ve alan adıyla yeniden kurulur; diskteki TÜM veriler silinir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer id (= service id in the client area)

İstek gövdesi

AlanTürAçıklama
confirm zorunluboolean = true

Yanıtlar

202Started (install_id, attempt)
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 ...)
429install_limit

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/app/retry' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro server app retry 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/app/retry", 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/servers/12345/app/retry", {
  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}`);