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

Nesne depolama (S3)

S3 depolama kısayolları: kovalar, erişim anahtarları (gizli bir kez), kullanım, bağlantı bilgisi.

#GET/cloud/storage/{id}/buckets

buckets (GyroDepolama)Kapsam: services_readtyped_get_storage__id__bucketsBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç buckets. Gövde alanları aracın kendi alanlarıdır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro api request GET /cloud/storage/12345/buckets
# kaynak gyro_storage_bucket: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket
resource "gyro_storage_bucket" "assets" {
  service_id = 456
  name       = "assets"
}

# Protected Storage: versioned bucket with object lock (WORM).
# The real bucket name is "archive-<service code>": use full_name in S3 clients and other resources.
resource "gyro_storage_bucket" "archive" {
  service_id  = 789
  name        = "archive"
  object_lock = true
}
import os, uuid, requests

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

Kova oluşturKapsam: services_writetyped_post_storage__id__bucketsBu işlemin OpenAPI parçası

Kova oluşturur. Nesne Depolama: ad hizmete özeldir. Korumalı Depolama: her kova sürümlüdür ve ada hizmet kodu eklenir (<ad>-<kod>); object_lock: true WORM kovası açar (boş kilitli kova hakkı gerekir: Nesne Kilidi ek hizmeti, bkz. GET /cloud/storage/{id}/object-lock). Nesne kilidi yalnız açılışta seçilir, sonradan kapatılamaz. Standart Nesne Depolama'da object_lock: true 409 feature_not_available döner. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
bucket zorunlustringBucket name (3-58, lowercase letters, digits, -)
object_lockbooleanProtected Storage only: create with object lock (WORM). Cannot be changed later
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"bucket": "string", "object_lock": true, "confirm": true}'
gyro api request POST /cloud/storage/12345/buckets --data '{"bucket": "string", "object_lock": true, "confirm": true}'
# kaynak gyro_storage_bucket: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket
resource "gyro_storage_bucket" "assets" {
  service_id = 456
  name       = "assets"
}

# Protected Storage: versioned bucket with object lock (WORM).
# The real bucket name is "archive-<service code>": use full_name in S3 clients and other resources.
resource "gyro_storage_bucket" "archive" {
  service_id  = 789
  name        = "archive"
  object_lock = true
}
import os, uuid, requests

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

#DELETE/cloud/storage/{id}/buckets/{bucket}

buckets:delete (GyroDepolama)Kapsam: services_writetyped_delete_storage__id__buckets__bucketBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç buckets, eylem delete. Gövde alanları aracın kendi alanlarıdır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro api request DELETE /cloud/storage/12345/buckets/1 --data '{"confirm": true}'
# kaynak gyro_storage_bucket: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket
resource "gyro_storage_bucket" "assets" {
  service_id = 456
  name       = "assets"
}

# Protected Storage: versioned bucket with object lock (WORM).
# The real bucket name is "archive-<service code>": use full_name in S3 clients and other resources.
resource "gyro_storage_bucket" "archive" {
  service_id  = 789
  name        = "archive"
  object_lock = true
}
import os, uuid, requests

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

access-keys (GyroDepolama)Kapsam: services_readtyped_get_storage__id__keysBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç access-keys. Gövde alanları aracın kendi alanlarıdır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro api request GET /cloud/storage/12345/keys
# kaynak gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

access-keys:create (GyroDepolama)Kapsam: services_writetyped_post_storage__id__keysBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç access-keys, eylem create. Gövde alanları aracın kendi alanlarıdır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro api request POST /cloud/storage/12345/keys --data '{"confirm": true}'
# kaynak gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

#POST/cloud/storage/{id}/keys/{key}/rotate

access-keys:rotate (GyroDepolama)Kapsam: services_writetyped_post_storage__id__keys__key__rotateBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç access-keys, eylem rotate. Gövde alanları aracın kendi alanlarıdır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
key zorunlupathstring

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys/1/rotate' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage key rotate 12345 --help    # tüm seçenekler
# kaynak gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

#DELETE/cloud/storage/{id}/keys/{key}

access-keys:delete (GyroDepolama)Kapsam: services_writetyped_delete_storage__id__keys__keyBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç access-keys, eylem delete. Gövde alanları aracın kendi alanlarıdır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
key zorunlupathstring

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/keys/1' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro api request DELETE /cloud/storage/12345/keys/1 --data '{"confirm": true}'
# kaynak gyro_storage_key: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_key
resource "gyro_storage_key" "ci" {
  service_id = 456
  label      = "ci-uploader"
}

output "s3_secret" {
  value     = gyro_storage_key.ci.secret_key
  sensitive = true
}
import os, uuid, requests

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

usage (GyroDepolama)Kapsam: services_readtyped_get_storage__id__usageBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç usage. Gövde alanları aracın kendi alanlarıdır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

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

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

Kova adını değiştirKapsam: services_writetyped_post_storage__id__buckets__bucket__renameBu işlemin OpenAPI parçası

Kova adları hizmete özeldir (aynı adı başka müşteriler de kullanabilir). Veri taşınmaz. Eski adla S3 erişimi hemen durur; web sitesi <yeni>-<hizmet kodu>.web.gyro-s3.com olur, eski web adresi 40 gün 301 ile yönlendirilir; paylaşım bağlantıları çalışır. Kova başına günde en çok 5; eski ad 40 gün bu hizmette yeniden kullanılamaz. "confirm": true gerekir. Korumalı Depolama (2.20.0): ad değiştirme desteklenir: kovanın görünen adı ve web adresi (<yeni ad>-<hizmet kodu>.kweb.gyro-s3.com, eski adres 40 gün 301) değişir; S3 adı aynı kalır (sürüm ve kilitler taşınmaz), S3 araçları onu kullanmaya devam eder.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
new_name zorunlustring
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/rename' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"new_name": "string", "confirm": true}'
gyro storage bucket rename 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/storage/12345/buckets/1/rename", headers=h, json={"new_name": "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/storage/12345/buckets/1/rename", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"new_name": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/objects

Kova klasöründeki nesneleri listeleKapsam: services_readtyped_get_storage__id__buckets__bucket__objectsBu işlemin OpenAPI parçası

Bir klasörün bir sayfası (200): folders ve files (anahtar, boyut, tarih). Devam için önceki sayfanın next değerini verin.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring
prefixquerystringFolder, ends with / (empty = root)
searchquerystringName prefix inside the folder
nextquerystringContinuation token

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object list 12345
import os, uuid, requests

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

İmzalı yükleme adresleriKapsam: services_writetyped_post_storage__id__buckets__bucket__objects_upload_urlBu işlemin OpenAPI parçası

Çağrı başına en çok 100 dosya, dosya başına 5 GiB. Dosyayı 15 dakika içinde her url adresine PUT edin; veri API'den geçmez. Büyük dosyalar: herhangi bir S3 istemcisi (multipart).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
prefixstringTarget folder (ends with /)
items zorunluarray<object>
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/upload-url' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prefix": "string", "items": [{"name": "string", "size": 1}], "confirm": true}'
gyro storage object upload-url 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/storage/12345/buckets/1/objects/upload-url", headers=h, json={"prefix": "string", "items": [{"name": "string", "size": 1}], "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/upload-url", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"prefix": "string", "items": [{"name": "string", "size": 1}], "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/objects/download-url

İmzalı indirme adresiKapsam: services_writetyped_post_storage__id__buckets__bucket__objects_download_urlBu işlemin OpenAPI parçası

15 dakikalık GET adresi döner (Content-Disposition: attachment). İndirmeler hizmetin aylık trafiğinden düşer.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
key zorunlustringObject key
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/download-url' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "confirm": true}'
gyro storage object download-url 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/storage/12345/buckets/1/objects/download-url", headers=h, json={"key": "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/storage/12345/buckets/1/objects/download-url", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/objects/delete

Nesneleri silKapsam: services_writetyped_post_storage__id__buckets__bucket__objects_deleteBu işlemin OpenAPI parçası

Tek çağrıda en çok 1000 anahtar siler. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
keys zorunluarray<string>
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/delete' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"keys": ["string"], "confirm": true}'
gyro storage object delete 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/storage/12345/buckets/1/objects/delete", headers=h, json={"keys": ["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/storage/12345/buckets/1/objects/delete", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"keys": ["string"], "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/folders

Klasör oluşturKapsam: services_writetyped_post_storage__id__buckets__bucket__foldersBu işlemin OpenAPI parçası

Boş klasör işareti prefix + name + / oluşturur.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
prefixstring
name zorunlustring
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/folders' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prefix": "string", "name": "string", "confirm": true}'
gyro storage folder 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/storage/12345/buckets/1/folders", headers=h, json={"prefix": "string", "name": "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/storage/12345/buckets/1/folders", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"prefix": "string", "name": "string", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#DELETE/cloud/storage/{id}/buckets/{bucket}/folders

Klasörü içindekilerle silKapsam: services_writetyped_delete_storage__id__buckets__bucket__foldersBu işlemin OpenAPI parçası

prefix (sorgu) altındaki tüm nesneleri siler. Büyük klasörler parça parça silinir: more true olduğu sürece tekrarlayın. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring
prefixquerystringFolder, ends with /

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/folders' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage folder delete 12345 --help    # tüm seçenekler
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/folders", 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/storage/12345/buckets/1/folders", {
  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/storage/{id}/buckets/{bucket}/folders/count

Klasördeki nesneleri sayKapsam: services_readtyped_get_storage__id__buckets__bucket__folders_countBu işlemin OpenAPI parçası

prefix altındaki nesne sayısı (more = 100000 üstü ya da süre sınırı).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring
prefixquerystringFolder, ends with /

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/folders/count' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage folder count 12345
import os, uuid, requests

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

connect (GyroDepolama)Kapsam: services_readtyped_get_storage__id__connectBu işlemin OpenAPI parçası

Genel köprünün kısayolu: araç connect. Gövde alanları aracın kendi alanlarıdır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

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

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

Kovanın statik web sitesi ayarlarıKapsam: services_readtyped_get_storage__id__buckets__bucket__websiteBu işlemin OpenAPI parçası

enabled, url, index_document (giriş dosyası, varsayılan index.html), error_document (404 sayfası) ve spa (tek sayfa uygulama yönlendirmesi).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/website' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage website get 12345
# kaynak gyro_storage_bucket_website: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_website
# Single-page app (React / Vue / Angular) published from a bucket
resource "gyro_storage_bucket_website" "app" {
  service_id     = 456 # object storage service
  bucket         = gyro_storage_bucket.assets.name
  index_document = "index.html" # entry file (default index.html)
  spa            = true         # missing paths (/dashboard/settings, reloads) return index.html with 200
}

# Classic static site with its own 404 page
resource "gyro_storage_bucket_website" "docs" {
  service_id     = 456
  bucket         = "docs"
  error_document = "404.html"
}

output "app_url" { value = gyro_storage_bucket_website.app.url }
import os, uuid, requests

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

Statik web sitesini aç / güncelleKapsam: services_writetyped_put_storage__id__buckets__bucket__websiteBu işlemin OpenAPI parçası

Tam değiştirme: verilmeyen alanlar varsayılana döner (index.html, 404 sayfası yok, SPA kapalı). index_document bir dosya adıdır (/ yok); kökte ve her klasörde açılır. spa: true bulunmayan her yolu giriş dosyasıyla ve 200 koduyla yanıtlar (React/Vue/Angular yönlendirme, sayfa yenileme); gerçek dosyalar olduğu gibi gelir, SPA açıkken 404 sayfası kullanılmaz. Kapalı siteyi açmak accept: true ister (kötüye kullanım kuralları: kovadaki her şey herkese açılır).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
index_documentstringEntry file name, default index.html (e.g. app.html)
error_documentstringObject key of the 404 page (e.g. 404.html or errors/404.html), empty = none
spabooleanRoute missing sub-paths to the entry file with status 200
acceptbooleanAccept the abuse rules (needed when the website is off)
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/website' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"index_document": "string", "error_document": "string", "spa": true, "accept": true, "confirm": true}'
gyro storage website set 12345 --help    # tüm seçenekler
# kaynak gyro_storage_bucket_website: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_website
# Single-page app (React / Vue / Angular) published from a bucket
resource "gyro_storage_bucket_website" "app" {
  service_id     = 456 # object storage service
  bucket         = gyro_storage_bucket.assets.name
  index_document = "index.html" # entry file (default index.html)
  spa            = true         # missing paths (/dashboard/settings, reloads) return index.html with 200
}

# Classic static site with its own 404 page
resource "gyro_storage_bucket_website" "docs" {
  service_id     = 456
  bucket         = "docs"
  error_document = "404.html"
}

output "app_url" { value = gyro_storage_bucket_website.app.url }
import os, uuid, requests

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

#DELETE/cloud/storage/{id}/buckets/{bucket}/website

Statik web sitesini kapatKapsam: services_writetyped_delete_storage__id__buckets__bucket__websiteBu işlemin OpenAPI parçası

Kova durur; ayarlar (giriş dosyası, 404, SPA) sonraki açılış için saklanır. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/website' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage website disable 12345 --help    # tüm seçenekler
# kaynak gyro_storage_bucket_website: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_website
# Single-page app (React / Vue / Angular) published from a bucket
resource "gyro_storage_bucket_website" "app" {
  service_id     = 456 # object storage service
  bucket         = gyro_storage_bucket.assets.name
  index_document = "index.html" # entry file (default index.html)
  spa            = true         # missing paths (/dashboard/settings, reloads) return index.html with 200
}

# Classic static site with its own 404 page
resource "gyro_storage_bucket_website" "docs" {
  service_id     = 456
  bucket         = "docs"
  error_document = "404.html"
}

output "app_url" { value = gyro_storage_bucket_website.app.url }
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/website", 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/storage/12345/buckets/1/website", {
  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/storage/{id}/buckets/{bucket}/cors

Kovanın CORS kurallarıKapsam: services_readtyped_get_storage__id__buckets__bucket__corsBu işlemin OpenAPI parçası

rules (snake_case) ve json (aynı kurallar AWS S3 biçiminde).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

Yanıtlar

200Tool data / result — data: object
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 ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/cors' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage cors get 12345
# kaynak gyro_storage_bucket_cors: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_cors
resource "gyro_storage_bucket_cors" "assets" {
  service_id = 456
  bucket     = gyro_storage_bucket.assets.name
  rules = [
    {
      id              = "browser-upload" # presigned PUT from your web app
      allowed_origins = ["https://www.example.com", "https://example.com"]
      allowed_methods = ["GET", "HEAD", "PUT", "POST"]
      allowed_headers = ["*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3600
    },
    {
      allowed_origins = ["*"] # public read for fonts / images
      allowed_methods = ["GET", "HEAD"]
    },
  ]
}
import os, uuid, requests

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

Kovanın CORS kurallarını değiştirKapsam: services_writetyped_put_storage__id__buckets__bucket__corsBu işlemin OpenAPI parçası

Tüm kuralların yerine geçer. rules (dizi), CORSRules (AWS put-bucket-cors dosyası olduğu gibi: --data @cors.json) ya da cors_json (metin) gönderin. Alan adları AWS (AllowedOrigins) ya da snake_case olabilir. Sınırlar: 100 kural, kural başına 50 köken/başlık, 16 KB, yöntemler GET/PUT/POST/DELETE/HEAD, MaxAgeSeconds 0-86400, kökende en çok bir *. Boş liste kuralları kaldırır. Kurallar S3 adresinde ve statik web sitesinde (özel alan adları dahil) geçerlidir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
rulesobjectCORS rules as a JSON array
cors_jsonstringAlternative: the rules as JSON text ({"CORSRules":[...]} or [...])
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/cors' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"rules": {}, "cors_json": "string", "confirm": true}'
gyro storage cors set 12345 --help    # tüm seçenekler
# kaynak gyro_storage_bucket_cors: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_cors
resource "gyro_storage_bucket_cors" "assets" {
  service_id = 456
  bucket     = gyro_storage_bucket.assets.name
  rules = [
    {
      id              = "browser-upload" # presigned PUT from your web app
      allowed_origins = ["https://www.example.com", "https://example.com"]
      allowed_methods = ["GET", "HEAD", "PUT", "POST"]
      allowed_headers = ["*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3600
    },
    {
      allowed_origins = ["*"] # public read for fonts / images
      allowed_methods = ["GET", "HEAD"]
    },
  ]
}
import os, uuid, requests

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

#DELETE/cloud/storage/{id}/buckets/{bucket}/cors

Kovanın tüm CORS kurallarını kaldırKapsam: services_writetyped_delete_storage__id__buckets__bucket__corsBu işlemin OpenAPI parçası

Tarayıcılar kovayı başka kökenden okuyamaz. "confirm": true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id
bucket zorunlupathstring

İstek gövdesi

AlanTürAçıklama
confirmboolean

Yanıtlar

202Tool data / result — data: object
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 ...)

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/cors' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"confirm": true}'
gyro storage cors delete 12345 --help    # tüm seçenekler
# kaynak gyro_storage_bucket_cors: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_cors
resource "gyro_storage_bucket_cors" "assets" {
  service_id = 456
  bucket     = gyro_storage_bucket.assets.name
  rules = [
    {
      id              = "browser-upload" # presigned PUT from your web app
      allowed_origins = ["https://www.example.com", "https://example.com"]
      allowed_methods = ["GET", "HEAD", "PUT", "POST"]
      allowed_headers = ["*"]
      expose_headers  = ["ETag"]
      max_age_seconds = 3600
    },
    {
      allowed_origins = ["*"] # public read for fonts / images
      allowed_methods = ["GET", "HEAD"]
    },
  ]
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
r = requests.delete("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/cors", 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/storage/12345/buckets/1/cors", {
  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/storage/{id}/object-lock

Korumalı Depolama: nesne kilidi özetiKapsam: services_readgetStorageObjectLockBu işlemin OpenAPI parçası

Kilitli kova hakkı (Nesne Kilidi ek hizmeti) ve kullanımı, kovaların varsayılan saklaması ve son kilit taraması (COMPLIANCE / GOVERNANCE / legal hold sürüm sayısı, en geç bitiş). Yalnız Korumalı Depolama: standart Nesne Depolama hizmeti 409 feature_not_available döner.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)

Yanıtlar

200OK — data: StorageObjectLockSummary
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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

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

Kilitli sürümleri şimdi taraKapsam: services_writescanStorageObjectLockBu işlemin OpenAPI parçası

Kilitli kovalardaki kilitli sürümleri sayar (en çok 25 sn / 5000 sürüm; yarım kalırsa complete: false).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
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/storage/12345/object-lock/scan' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object-lock scan 12345
import os, uuid, requests

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

#GET/cloud/storage/{id}/buckets/{bucket}/versions

Nesne sürümlerini listeleKapsam: services_readlistStorageVersionsBu işlemin OpenAPI parçası

Bir klasördeki sürümler ve silme işaretleri (sayfa 50, ayraç /; alt klasörler folders). truncated true iken önceki sayfanın key_marker + version_id_marker değerleriyle devam edin. Kilitli kovalarda her sürümde lock_mode, retain_until, legal_hold bulunur.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)
prefixquerystringFolder or key prefix (empty = root)
key_markerquerystringContinuation: next_key_marker of the previous page
version_id_markerquerystringContinuation: next_version_id_marker of the previous page

Yanıtlar

200OK — data: StorageVersionList
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

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

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

#DELETE/cloud/storage/{id}/buckets/{bucket}/versions

Sürümü kalıcı silKapsam: services_writedeleteStorageVersionBu işlemin OpenAPI parçası

Bir sürümü ya da silme işaretini kalıcı siler (geri alınamaz). GOVERNANCE / COMPLIANCE saklamasında ya da legal hold'daki sürüm bitiş tarihiyle reddedilir. confirm=true gerekir.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)
key zorunluquerystringObject key
version_id zorunluquerystringVersion id
confirm zorunluqueryboolean

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
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/storage/12345/buckets/1/versions' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage versions delete 12345
import os, uuid, requests

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

Eski sürümü geri yükleKapsam: services_writerestoreStorageVersionBu işlemin OpenAPI parçası

Sürümü yeni güncel sürüm olarak kopyalar (eskisi durur). En çok 5 GB; silme işareti geri yüklenmez (undelete kullanın).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

İstek gövdesi

AlanTürAçıklama
key zorunlustringObject key
version_id zorunlustringVersion id (from versions list)

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
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/storage/12345/buckets/1/versions/restore' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string"}'
gyro storage versions restore 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/storage/12345/buckets/1/versions/restore", headers=h, json={"key": "string", "version_id": "string"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/versions/restore", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "version_id": "string"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#POST/cloud/storage/{id}/buckets/{bucket}/versions/undelete

Silme işaretini kaldırKapsam: services_writeundeleteStorageObjectBu işlemin OpenAPI parçası

Anahtarın en güncel silme işaretini kaldırır; önceki sürüm yeniden güncel olur. version_id o silme işareti olmalıdır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

İstek gövdesi

AlanTürAçıklama
key zorunlustringObject key
version_id zorunlustringVersion id (from versions list)

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
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/storage/12345/buckets/1/versions/undelete' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string"}'
gyro storage versions undelete 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/storage/12345/buckets/1/versions/undelete", headers=h, json={"key": "string", "version_id": "string"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/versions/undelete", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "version_id": "string"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/object-lock

Kovanın varsayılan saklamasıKapsam: services_readgetStorageBucketObjectLockBu işlemin OpenAPI parçası

object_lock (açılışta seçilir, değişmez) ve default_retention (null = yok): yeni nesneler bu saklamayı kendiliğinden alır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

Yanıtlar

200OK — data: StorageBucketObjectLock
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/object-lock' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object-lock get 12345
# kaynak gyro_storage_bucket_object_lock: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_object_lock
# Lock every new object version for 30 days (GOVERNANCE: Gyro staff can bypass it on request).
resource "gyro_storage_bucket_object_lock" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  mode       = "GOVERNANCE"
  days       = 30
}

# COMPLIANCE: nobody (Gyro included) can delete or shorten the lock until it expires.
# resource "gyro_storage_bucket_object_lock" "audit" {
#   service_id             = 789
#   bucket                 = gyro_storage_bucket.audit.full_name
#   mode                   = "COMPLIANCE"
#   days                   = 365
#   acknowledge_compliance = true
# }
import os, uuid, requests

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

Kovanın varsayılan saklamasını ayarlaKapsam: services_writesetStorageBucketObjectLockBu işlemin OpenAPI parçası

Yalnız kilitli kovalar. mode GOVERNANCE ya da COMPLIANCE ve days 1-3650, ya da OFF (yeni nesnelere otomatik saklama yok; mevcut kilitler sürer). GOVERNANCE: yalnız Gyro personeli talep üzerine aşabilir. COMPLIANCE kilidi süresi dolana kadar kimse (Gyro dahil) kısaltamaz, GOVERNANCE'a çeviremez, kaldıramaz; veri saklanır ve iptalde bile süre sonuna kadar ücret sürer. "confirm": true ve "acknowledge": "COMPLIANCE" gönderin.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

İstek gövdesi

AlanTürAçıklama
mode zorunlustring (GOVERNANCE, COMPLIANCE, OFF)
daysintegerRetention days (not with OFF)
acknowledgestring (COMPLIANCE)COMPLIANCE only: type COMPLIANCE to accept that it cannot be removed
confirmboolean

Yanıtlar

202OK — data: StorageBucketObjectLock
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/object-lock' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": true}'
gyro storage object-lock set 12345 --help    # tüm seçenekler
# kaynak gyro_storage_bucket_object_lock: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_object_lock
# Lock every new object version for 30 days (GOVERNANCE: Gyro staff can bypass it on request).
resource "gyro_storage_bucket_object_lock" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  mode       = "GOVERNANCE"
  days       = 30
}

# COMPLIANCE: nobody (Gyro included) can delete or shorten the lock until it expires.
# resource "gyro_storage_bucket_object_lock" "audit" {
#   service_id             = 789
#   bucket                 = gyro_storage_bucket.audit.full_name
#   mode                   = "COMPLIANCE"
#   days                   = 365
#   acknowledge_compliance = true
# }
import os, uuid, requests

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

#GET/cloud/storage/{id}/buckets/{bucket}/objects/retention

Nesne sürümünün saklamasıKapsam: services_readgetStorageObjectRetentionBu işlemin OpenAPI parçası

Bir sürümün kilit kipi, bitiş tarihi ve legal hold durumu (version_id boş = güncel sürüm).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)
key zorunluquerystringObject key
version_idquerystringVersion id (empty = current)

Yanıtlar

200OK — data: StorageObjectRetention
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/retention' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object retention get 12345
import os, uuid, requests

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

Nesne sürümünü kilitleKapsam: services_writesetStorageObjectRetentionBu işlemin OpenAPI parçası

Bir sürümün saklamasını şimdiden itibaren days (1-3650) gün olarak koyar ya da uzatır (version_id boş = güncel). Saklama yalnız uzatılabilir; COMPLIANCE GOVERNANCE'a çevrilemez. COMPLIANCE kilidi süresi dolana kadar kimse (Gyro dahil) kısaltamaz, GOVERNANCE'a çeviremez, kaldıramaz; veri saklanır ve iptalde bile süre sonuna kadar ücret sürer. "confirm": true ve "acknowledge": "COMPLIANCE" gönderin.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

İstek gövdesi

AlanTürAçıklama
key zorunlustring
version_idstringEmpty = current version
mode zorunlustring (GOVERNANCE, COMPLIANCE)
days zorunluinteger
acknowledgestring (COMPLIANCE)COMPLIANCE only: type COMPLIANCE
confirmboolean

Yanıtlar

202OK — data: StorageObjectRetention
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/retention' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string", "mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": true}'
gyro storage object retention set 12345 --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/storage/12345/buckets/1/objects/retention", headers=h, json={"key": "string", "version_id": "string", "mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/retention", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "version_id": "string", "mode": "GOVERNANCE", "days": 1, "acknowledge": "COMPLIANCE", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/objects/legal-hold

Nesne sürümünün legal hold durumuKapsam: services_readgetStorageObjectLegalHoldBu işlemin OpenAPI parçası

legal_hold true = kaldırılana kadar sürüm silinemez (bitiş tarihi yok).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)
key zorunluquerystringObject key
version_idquerystringVersion id (empty = current)

Yanıtlar

200OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/legal-hold' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage object legal-hold get 12345
import os, uuid, requests

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

Legal hold koy / kaldırKapsam: services_writesetStorageObjectLegalHoldBu işlemin OpenAPI parçası

status on / off (yalnız kilitli kovalar). Legal hold, saklamadan bağımsız ve bitiş tarihsiz silmeyi engeller; kendiniz kaldırabilirsiniz.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

İstek gövdesi

AlanTürAçıklama
key zorunlustring
version_idstringEmpty = current version
status zorunlustring (on, off)

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/legal-hold' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"key": "string", "version_id": "string", "status": "on"}'
gyro storage object legal-hold set 12345 --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/storage/12345/buckets/1/objects/legal-hold", headers=h, json={"key": "string", "version_id": "string", "status": "on"}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/objects/legal-hold", {
  method: "PUT",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({"key": "string", "version_id": "string", "status": "on"}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}/buckets/{bucket}/lifecycle/noncurrent

Kovanın eski sürüm silme kuralıKapsam: services_readgetStorageNoncurrentExpirationBu işlemin OpenAPI parçası

Eski (güncel olmayan) sürümlerin kaç gün sonra silineceği (yeni kovalarda 30). 0 / null = siz silene kadar durur (kotadan düşer).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

Yanıtlar

200OK — data: StorageNoncurrentExpiration
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/lifecycle/noncurrent' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage lifecycle noncurrent get 12345
# kaynak gyro_storage_bucket_noncurrent_expiration: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_noncurrent_expiration
# Delete old (non-current) versions 7 days after they are replaced or deleted.
resource "gyro_storage_bucket_noncurrent_expiration" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  days       = 7
}
import os, uuid, requests

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

Eski sürüm silme süresini ayarlaKapsam: services_writesetStorageNoncurrentExpirationBu işlemin OpenAPI parçası

days 1-3650 ya da 0 (eski sürümler durur). Kilitli sürümler saklaması bitince silinir. Kovanın diğer yaşam döngüsü kuralları korunur.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerService id (Protected Storage)
bucket zorunlupathstringBucket name (full name, with the -code suffix)

İstek gövdesi

AlanTürAçıklama
days zorunluinteger

Yanıtlar

202OK — data: StorageNoncurrentExpiration
404Not found — also returned for objects owned by someone else
409feature_not_available (standard Object Storage service) or not_actionable
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)

Örnekler

curl -s -X PUT 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345/buckets/1/lifecycle/noncurrent' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"days": 1}'
gyro storage lifecycle noncurrent set 12345 --help    # tüm seçenekler
# kaynak gyro_storage_bucket_noncurrent_expiration: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage_bucket_noncurrent_expiration
# Delete old (non-current) versions 7 days after they are replaced or deleted.
resource "gyro_storage_bucket_noncurrent_expiration" "archive" {
  service_id = gyro_storage_bucket.archive.service_id
  bucket     = gyro_storage_bucket.archive.full_name
  days       = 7
}
import os, uuid, requests

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

#GET/cloud/servers/{id}/storage-mounts

Sunucuya bağlı kovalarKapsam: cloud_readlistStorageMountsBu işlemin OpenAPI parçası

Nesne Depolama hizmetinizdeki bir kovayı Linux sunucunuza (systemd) klasör olarak bağlar (rclone FUSE, yerel yazma önbelleği, açılışta başlar, kopunca yeniden bağlanır). Her bağlantının yalnız o kovaya yetkili (salt okuma ya da okuma/yazma) ayrı bir erişim anahtarı vardır; anahtar sınırınızdan düşmez, bağlantıyla birlikte silinir. Gyro Bulut İstanbul (tr-ist-1) sunucularında otomatik uygulanır (automatic: true); diğer sunucularda install_command bir kez çalıştırılır. Ücretsizdir; S3 trafiği depolama hizmetinden sayılır. Korumalı Depolama kovaları: varsayılan salt okuma (2.20.0).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer service id

Yanıtlar

200OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount list 12345
# kaynak gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

Kovayı sunucuya bağlaKapsam: cloud_writecreateStorageMountBu işlemin OpenAPI parçası

Nesne Depolama hizmetinizdeki bir kovayı Linux sunucunuza (systemd) klasör olarak bağlar (rclone FUSE, yerel yazma önbelleği, açılışta başlar, kopunca yeniden bağlanır). Her bağlantının yalnız o kovaya yetkili (salt okuma ya da okuma/yazma) ayrı bir erişim anahtarı vardır; anahtar sınırınızdan düşmez, bağlantıyla birlikte silinir. Gyro Bulut İstanbul (tr-ist-1) sunucularında otomatik uygulanır (automatic: true); diğer sunucularda install_command bir kez çalıştırılır. Ücretsizdir; S3 trafiği depolama hizmetinden sayılır. Yanıtta install_command döner (tek kullanımlık, 60 dakika). Korumalı Depolama (2.20.0): desteklenir; read_only: false ve accept_versioning: true verilmedikçe salt okuma bağlanır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer service id

İstek gövdesi

AlanTürAçıklama
storage_service_id zorunluintegeryour active Object Storage service
bucket zorunlustringbucket name in that service
mount_pointstringabsolute path under /mnt, /srv, /data, /media, /opt, /home or /var/www; default /mnt/<bucket>. Must be empty or missing on the server.
read_onlybooleanDefault: false on Object Storage, true on Protected Storage.
accept_versioningbooleanProtected Storage read/write only: confirms that every write/overwrite creates a new version, deletes only add a delete marker, locked files cannot be deleted and used space/cost grow. Without it: 422 versioning_ack_required.

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422invalid_bucket | invalid_mount_point | versioning_ack_required (Protected Storage read/write without accept_versioning) | storage_error
429rate_limited
503storage_mount_unavailable

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"storage_service_id": 1, "bucket": "backups", "mount_point": "/mnt/backups", "read_only": true, "accept_versioning": true}'
gyro server storage-mount create 12345 --help    # tüm seçenekler
# kaynak gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

#GET/cloud/servers/{id}/storage-mounts/{mid}

Bağlantı ayrıntısıKapsam: cloud_readgetStorageMountBu işlemin OpenAPI parçası

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer service id
mid zorunlupathintegerStorage mount id

Yanıtlar

200OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount get 12345
# kaynak gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

#DELETE/cloud/servers/{id}/storage-mounts/{mid}

Bağlantıyı kaldırKapsam: cloud_writedeleteStorageMountBu işlemin OpenAPI parçası

Bağlantı anahtarı hemen silinir (sunucu kovaya erişemez; kovadaki dosyalar silinmez). tr-ist-1 sunucularında birim otomatik kaldırılır; diğerlerinde remove_command çalıştırın.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer service id
mid zorunlupathintegerStorage mount id

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Örnekler

curl -s -X DELETE 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts/1' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount remove 12345
# kaynak gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = 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/storage-mounts/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/storage-mounts/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}`);

#POST/cloud/servers/{id}/storage-mounts/{mid}/command

Yeni kurulum komutu (bağlantı anahtarı yenilenir)Kapsam: cloud_writerenewStorageMountCommandBu işlemin OpenAPI parçası

Bağlantı için yeni erişim anahtarı ve yeni tek kullanımlık komut üretir (eski anahtar hemen durur). Sunucu yeniden kurulduğunda ya da komutun süresi dolduğunda kullanın.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerServer service id
mid zorunlupathintegerStorage mount id

Yanıtlar

202OK — data: object
404Not found — also returned for objects owned by someone else
409server_not_active | storage_not_active | limit | mount_point_in_use | mount_point_nested | not_live
422Validation or business rule failure (confirm_required, invalid_image, tool_action_failed ...)
429rate_limited
503storage_mount_unavailable

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/servers/12345/storage-mounts/1/command' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro server storage-mount command 12345
# kaynak gyro_server_storage_mount: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/server_storage_mount
resource "gyro_server_storage_mount" "backups" {
  server_id          = gyro_server.web.id
  storage_service_id = 17546
  bucket             = "backups"
  mount_point        = "/mnt/backups"
}

# On servers outside tr-ist-1 run the one-time command on the server (sensitive, valid 60 minutes):
output "mount_command" {
  value     = gyro_server_storage_mount.backups.automatic ? "" : gyro_server_storage_mount.backups.install_command
  sensitive = true
}
import os, uuid, requests

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

#GET/cloud/storage/plans

Nesne depolama paketlerini listeleKapsam: cloud_readlistStoragePlansBu işlemin OpenAPI parçası

Sipariş edilebilir Nesne Depolama (standard-) ve Korumalı Depolama (protected-) paketleri: sınırlar, dönem başına fiyat (sabit EUR, KDV hariç) ve ek hizmetler: ek trafik paketi (1tb, 5tb, tek seferlik, bu takvim ayı) ve nesne kilitli kova hakkı (korumalı paketler). available: false = şu an kapasite yok.

Yanıtlar

200OK — data: array<StoragePlan>

Örnekler

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

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

Depolama hizmetlerini listeleKapsam: services_readlistStorageServicesBu işlemin OpenAPI parçası

Hesabın Nesne Depolama ve Korumalı Depolama hizmetleri (GET /cloud/services ile aynı süzgeç ve sayfalama).

Yanıtlar

200OK

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro api request GET /cloud/storage
# kaynak gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
import os, uuid, requests

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

Nesne depolama (S3) sipariş etKapsam: cloud_ordercreateStorageServicesBu işlemin OpenAPI parçası

Bir paketten 1..N depolama hizmetini TEK siparişte açar (quantity, varsayılan 1, en çok 25) ve hesap bakiyesinden öder (kayıtlı kart asla). cycle dönemine göre ücretlendirilir (monthly | quarterly | semiannually | annually; sabit EUR fiyat hesap para biriminde) ve diğer hizmetler gibi bakiyeden yenilenir. extra_traffic (1tb | 5tb) bu ay için tek seferlik trafik paketi ekler; object_lock_buckets (korumalı paketler, 1-50) nesne kilidi hakkı alır (her dönem ücretlenir). name ({n} ile), tags ve project_id hizmetleri adlandırır. Teklif için "dry_run": true; gerçek sipariş "confirm": true ve Idempotency-Key başlığı ister. İlk kova ve ilk erişim anahtarı yaklaşık bir dakikada kendiliğinden oluşur (durum inprocess -> active); sonra /cloud/storage/{id}/buckets, /keys, /connect.

Parametreler

AlaninTürAçıklama
Idempotency-Key zorunluheaderstringUnique per logical request (e.g. a UUID). Replays within 24 hours return the stored answer.

İstek gövdesi

AlanTürAçıklama
planstringplan from GET /cloud/storage/plans
product_idintegerproduct id instead of plan
cyclestring (monthly, quarterly, semiannually, annually)billing cycle
quantityintegerservices to create in one order (--count), max 25
extra_trafficstring (1tb, 5tb)one-time traffic pack for this calendar month
object_lock_bucketsintegerprotected plans: object lock bucket rights (billed every cycle)
namestringname (nickname); {n} = number in a batch
tagsarray<string>
project_idinteger | nullproject (0 = default project)
end_customer_idintegerreseller main key: assign to this end-customer
confirmboolean
dry_runboolean

Yanıtlar

200Dry-run quote
201Ordered and paid; services are being set up — data: object
402Account balance does not cover the order (insufficient_balance)
403Key lacks the scope, IP not allowed, or feature disabled
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 ...)
429Too many requests (rate_limited); see the Retry-After and X-RateLimit-* headers

Örnekler

curl -s -X POST 'https://www.gyrohosting.com/api/v1/client/cloud/storage' \
  -H "Authorization: Bearer $GYRO_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{"plan": "standard-1tb", "cycle": "monthly", "name": "gyro-proje-s3", "extra_traffic": "1tb", "confirm": true}'
gyro storage create --help    # tüm seçenekler
# kaynak gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
import os, uuid, requests

h = {"Authorization": "Bearer " + os.environ["GYRO_TOKEN"]}
h["Idempotency-Key"] = str(uuid.uuid4())
r = requests.post("https://www.gyrohosting.com/api/v1/client/cloud/storage", headers=h, json={"plan": "standard-1tb", "cycle": "monthly", "name": "gyro-proje-s3", "extra_traffic": "1tb", "confirm": True}, timeout=60)
r.raise_for_status()
print(r.json()["data"])
const res = await fetch("https://www.gyrohosting.com/api/v1/client/cloud/storage", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.GYRO_TOKEN}`,
    "Content-Type": "application/json",
    "Idempotency-Key": crypto.randomUUID(),
  },
  body: JSON.stringify({"plan": "standard-1tb", "cycle": "monthly", "name": "gyro-proje-s3", "extra_traffic": "1tb", "confirm": true}),
});
const { data, error } = await res.json();
if (!res.ok) throw new Error(`${error.code}: ${error.message}`);

#GET/cloud/storage/{id}

Depolama hizmeti ayrıntısıKapsam: services_readgetStorageServiceBu işlemin OpenAPI parçası

Hizmet satırı ve storage (paket, tür, sınırlar, S3 uç noktası, bölge).

Parametreler

AlaninTürAçıklama
id zorunlupathintegerStorage service id

Yanıtlar

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

Örnekler

curl -s 'https://www.gyrohosting.com/api/v1/client/cloud/storage/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage get 12345
# kaynak gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
import os, uuid, requests

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

#DELETE/cloud/storage/{id}

Depolama hizmetini iptal etKapsam: cloud_deletedeleteStorageServiceBu işlemin OpenAPI parçası

confirm=true zorunlu. immediate=true hemen iptal eder: erişim anahtarları, web sitesi ve özel alan adları yaklaşık bir dakikada durur, tüm kovalar ve nesneler dakikalar içinde kalıcı olarak silinir (geri alınamaz; Korumalı Depolama'da COMPLIANCE kilidi ya da legal hold altındaki sürümler kilit bitene kadar kalır ve ücretlenir). immediate olmadan iptal talebi açılır, işlenene kadar hizmet çalışır.

Parametreler

AlaninTürAçıklama
id zorunlupathintegerStorage service id
confirm zorunluqueryboolean
immediatequeryboolean

Yanıtlar

202cancelling | cancellation_requested
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/storage/12345' \
  -H "Authorization: Bearer $GYRO_TOKEN"
gyro storage delete 12345
# kaynak gyro_storage: https://registry.terraform.io/providers/gyro-hosting/gyro/latest/docs/resources/storage
# Object Storage (S3) 1 TB, billed monthly from the account balance
resource "gyro_storage" "yedek" {
  plan  = "standard-1tb"
  cycle = "monthly"
  name  = "gyro-proje-yedek"

  # destroy deletes every bucket and object of the service
  lifecycle {
    prevent_destroy = true
  }
}

# Protected Storage with 2 object lock (WORM) buckets
resource "gyro_storage" "worm" {
  plan                = "protected-250gb"
  cycle               = "annually"
  object_lock_buckets = 2
}

resource "gyro_storage_bucket" "dosyalar" {
  service_id = gyro_storage.yedek.service_id
  name       = "gyro-proje-dosyalar"
}
import os, uuid, requests

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