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

Bayi

Bayi hesapları kendi uç-müşterilerini yönetir, hizmet atar, uç-müşteri anahtarı üretir ve kullanım raporu okur. Hizmetler bayinin hesabında kalır ve bayi indirimiyle fiyatlanır.

#GET/cloud/reseller/settings

Bayi ayarlarıKapsam: resellergetResellerSettingsBu işlemin OpenAPI parçası

Yanıtlar

200Settings — data: ResellerSettings
403Key lacks the scope, IP not allowed, or feature disabled

Örnekler

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

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

Bayi ayarlarını kaydet (beyaz etiket)Kapsam: resellersaveResellerSettingsBu işlemin OpenAPI parçası

İstek gövdesi

AlanTürAçıklama
white_labelboolean

Yanıtlar

200Settings — data: ResellerSettings
403Key lacks the scope, IP not allowed, or feature disabled

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/settings' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"white_label": true}'
gyro reseller setting set --help    # tüm seçenekler
import os, uuid, requests

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

#GET/cloud/reseller/report

Uç-müşteri başına kullanım ve fatura raporuKapsam: resellerresellerReportBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
fromquerystring
toquerystring

Yanıtlar

200Report — data: ResellerReport
403Key lacks the scope, IP not allowed, or feature disabled

Örnekler

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

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

Hizmeti uç-müşteriye ata (customer_id 0 = atamayı kaldır)Kapsam: resellerassignServiceBu işlemin OpenAPI parçası

İstek gövdesi

AlanTürAçıklama
service_id zorunluinteger
customer_id zorunluinteger

Yanıtlar

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

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/assign' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"service_id": 1, "customer_id": 1}'
gyro reseller assign --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/reseller/assign", headers=h, json={"service_id": 1, "customer_id": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/reseller/assign", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"service_id": 1, "customer_id": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/reseller/customers

Uç-müşterileri listeleKapsam: resellerlistResellerCustomersBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
external_refquerystring
pagequeryinteger
limitqueryinteger

Yanıtlar

200Customers — data: array<EndCustomer>
403Key lacks the scope, IP not allowed, or feature disabled

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/customers' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro reseller customer list
# kaynak gyro_reseller_customer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/reseller_customer
# Reseller (bayi) accounts only
resource "gyro_reseller_customer" "acme" {
  name         = "Acme Ltd"
  external_ref = "acme-001"
  allow_order  = true # Acme's keys may order servers, paid from YOUR balance at your discount
}
import os, uuid, requests

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

Uç-müşteri oluşturKapsam: resellercreateResellerCustomerBu işlemin OpenAPI parçası

İstek gövdesi

AlanTürAçıklama
namestring
emailstring
external_refstringYour own customer id (unique per reseller)
notestring
statusstring (active, suspended)
allow_orderbooleanMay this customer's keys order servers (paid from YOUR balance)?

Yanıtlar

201Created — data: EndCustomer
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/customers' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "Acme Ltd", "external_ref": "acme-001", "allow_order": false}'
gyro reseller customer create --help    # tüm seçenekler
# kaynak gyro_reseller_customer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/reseller_customer
# Reseller (bayi) accounts only
resource "gyro_reseller_customer" "acme" {
  name         = "Acme Ltd"
  external_ref = "acme-001"
  allow_order  = true # Acme's keys may order servers, paid from YOUR balance at your discount
}
import os, uuid, requests

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

#GET/cloud/reseller/customers/{id}

Uç-müşteriyi getirKapsam: resellergetResellerCustomerBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathinteger

Yanıtlar

200Customer — data: EndCustomer
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/customers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro reseller customer get 12345
# kaynak gyro_reseller_customer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/reseller_customer
# Reseller (bayi) accounts only
resource "gyro_reseller_customer" "acme" {
  name         = "Acme Ltd"
  external_ref = "acme-001"
  allow_order  = true # Acme's keys may order servers, paid from YOUR balance at your discount
}
import os, uuid, requests

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

Uç-müşteriyi güncelle (askıya alma = anahtarları çalışmaz)Kapsam: resellerupdateResellerCustomerBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathinteger

İstek gövdesi

AlanTürAçıklama
namestring
emailstring
external_refstringYour own customer id (unique per reseller)
notestring
statusstring (active, suspended)
allow_orderbooleanMay this customer's keys order servers (paid from YOUR balance)?

Yanıtlar

200Customer — data: EndCustomer
404Not found — also returned for objects owned by someone else

Örnekler

curl -s -X PATCH 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/customers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "email": "string", "external_ref": "string", "note": "string", "status": "active", "allow_order": true}'
gyro reseller customer update 12345 --help    # tüm seçenekler
# kaynak gyro_reseller_customer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/reseller_customer
# Reseller (bayi) accounts only
resource "gyro_reseller_customer" "acme" {
  name         = "Acme Ltd"
  external_ref = "acme-001"
  allow_order  = true # Acme's keys may order servers, paid from YOUR balance at your discount
}
import os, uuid, requests

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

#DELETE/cloud/reseller/customers/{id}

Uç-müşteriyi sil (anahtarlar ve webhook'lar iptal, hizmet ataması kalkar)Kapsam: resellerdeleteResellerCustomerBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathinteger
confirm zorunluqueryboolean

Yanıtlar

200Deleted
404Not found — also returned for objects owned by someone else
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/reseller/customers/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro reseller customer delete 12345
# kaynak gyro_reseller_customer: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/reseller_customer
# Reseller (bayi) accounts only
resource "gyro_reseller_customer" "acme" {
  name         = "Acme Ltd"
  external_ref = "acme-001"
  allow_order  = true # Acme's keys may order servers, paid from YOUR balance at your discount
}
import os, uuid, requests

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

Uç-müşterinin anahtarlarını listeleKapsam: resellerlistResellerCustomerKeysBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathinteger

Yanıtlar

200Keys — data: array<ApiKey>
404Not found — also returned for objects owned by someone else

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/customers/12345/keys' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro reseller customer key list 12345
import os, uuid, requests

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

Uç-müşteri için anahtar üret (token bir kez döner)Kapsam: resellercreateResellerCustomerKeyBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathinteger

İstek gövdesi

AlanTürAçıklama
name zorunlustring
scopesarray<string (cloud_read, cloud_write, cloud_order, cloud_delete, services_read, services_write, webhooks)>
servicesarray<integer>Optional service allow list
actionsarray<string>Optional action allow list: server actions (reboot) or tool:action / tool:* / method:name
ipsarray<string>
rate_limitintegerRequests per minute (<= your own limit; 0 = default)

Yanıtlar

201Created — data: object
404Not found — also returned for objects owned by someone else
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/reseller/customers/12345/keys' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name": "string", "scopes": ["cloud_read"], "services": [1], "actions": ["string"], "ips": ["string"], "rate_limit": 1}'
gyro reseller customer key 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/reseller/customers/12345/keys", headers=h, json={"name": "string", "scopes": ["cloud_read"], "services": [1], "actions": ["string"], "ips": ["string"], "rate_limit": 1}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/reseller/customers/12345/keys", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"name": "string", "scopes": ["cloud_read"], "services": [1], "actions": ["string"], "ips": ["string"], "rate_limit": 1}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/reseller/customers/{id}/keys/{kid}

Uç-müşteri anahtarını iptal etKapsam: resellerdeleteResellerCustomerKeyBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathinteger
kid zorunlupathinteger

Yanıtlar

200Deleted
404Not found — also returned for objects owned by someone else

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/reseller/customers/12345/keys/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro reseller customer key delete 12345
import os, uuid, requests

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